I installed Ubuntu app on Window 10 OS and trying to run dd command. But the dd command is not listing all drives present in system. I am not sure whether is it Ubuntu app limitation or something is missing in configuration. Please provide me inputs to resolve this issue.
You can't.
WSL is not a complete environment. Notably, it lacks a Linux kernel.
WSL is an abstraction layer that allows execution of 64-bit ELF binaries on Windows. It does not provide the traditional Linux device access.
This may change somewhat with WSL2, which is HyperV-based virtualization solution.
Ubuntu and Linux in general running in Windows
As already stated by in the answer by @vidarlo, WSL cannot do everything, that we are used to do in Ubuntu (or Linux in general). But it is a good tool, that provides several of the tools and functions, that we are used to from Ubuntu.
Another alternative, that also suffers from limitations due to the lack of a Linux kernel is the old CygWin.
@vidarlo also mentioned a virtualization solution, that might improve the capability of the next generation of WSL.
There are already other (and general) virtualization solutions. Maybe the most common one for personal use is VirtualBox.
If your computer has enough CPU 'horsepower' and enough memory (RAM), you can run the real Ubuntu live and/or install it in a virtual machine using VirtualBox.
Alternatives to
dd
in WindowsYou want to use
dd
in WSL. It makes me think that you want to clone from a hybrid iso file,file.iso
, or maybe from some other kind of image filefile.img
to a device, for example a USB pendrive, a memory card, an SSD or a hard disk drive.In this case you can use Windows tools for cloning,
If you want to do other tasks, for example recovering data from a failing drive, it may be a good idea to create a [persistent] live drive with Ubuntu, install
ddrescue
from the repository with the packagegddrescue
and maybe some other tools into it (for example TestDisk and PhotoRec) and work from there.I would recommend giving Cygwin's
dd
a try.To find the path to the disk or partition to use as input, view the file
/proc/partitions
first.
To backup the entire disk a Windows partition resides in (e.g.
sda2
) use a command line like this,/dev/sda
for the entire disk instead of the partition/dev/sda2