To copy or clone a USB stick, including its partitions, on a Linux system, you can use the dd
command. dd
is a utility for copying and converting data that is included with most Linux distributions.
Here is an example of how to use dd
to copy or clone a USB stick:
lsblk
command to list the block devices on your system, and look for the device name of the USB stick (e.g., /dev/sdc
).For example, to list the block devices on your system, you can use the following command:
refer tual:otturi.com$ lsblk
umount
command to unmount the USB stick.For example, to unmount the USB stick with the device name /dev/sdc
, you can use the following command:
$ umount /dev/sdc
dd
command to copy or clone the USB stick. To copy or clone the USB stick, you can use the dd
command with the if
and of
options to specify the input and output file, respectively. The input file should be the device name of the USB stick that you want to copy or clone (e.g., /dev/sdc
), and the output file should be the device name of the destination device (e.g., /dev/sdd
).Here is an example of the dd
command to copy or clone a USB stick:
$ dd if=/dev/sdc of=/dev/sdd
This will copy or clone the USB stick, including its partitions, to the destination device.
Note: Make sure that you use the correct device names for the input and output files. If you use the wrong device name, you may overwrite important data on your system.
status=progress
option to show a progress bar while the copy or clone operation is in progress. You can use the status=progress
option to display a progress bar while the dd
command is running.For example, to show a progress bar while copying or cloning the USB stick, you can use the following command:
$ dd if=/dev/sdc of=/dev/sdd status=progress
bs
option to specify the block size for the copy or clone operation. You can use the bs
option to specify the block size (in bytes) for the dd
command.For example, to specify a block size of 1 MB for the copy or clone operation, you can use the following command:
$ dd if=/dev/sdc of=/dev/sdd bs=1M
This will copy or clone the USB stick using a block size of 1 MB.
conv
option to perform data conversion while copying or cloning the USB stick. You can use the conv
option to specify various data conversion options while copying or cloning the USB stick.