How to Clone a Hard Drive with the Linux dd Command


The dd command copies raw blocks from one device to another, which makes it the oldest and most direct way to duplicate a disk on Linux. It ships with every distribution, needs no installation, and reads and writes at the speed the hardware allows.

This guide explains how to name the correct devices, run the copy without destroying the wrong disk, and confirm that the result is a working clone rather than a half-written drive.

PAGE CONTENT

Why Use dd for Cloning

dd is ideal for plain data disks, full-disk images, and Linux installations. It is more dangerous than a graphical tool, because it writes wherever you point it and never asks for confirmation.

Run disk commands in a terminal before starting the copy

Identify the Source and Target

Reversing the two device names is the classic dd failure. Read both devices twice, and disconnect every other external drive so the list stays short and unambiguous.

Check the installed disks and their models before cloning

Clone the Disk with dd

A copy that ends without an error message can still be incomplete if the target is smaller than the source. Check the byte count in the final line against the source size before you trust it.

Clone a Windows Disk with Qiling Disk Master

dd is a poor choice for a Windows system disk, because it copies the boot records exactly and cannot rebuild the boot configuration for a different drive. Qiling Disk Master handles that step and lets you clone from Windows with a guided wizard.

Watch the video tutorial below to clone the drive step by step with Qiling Disk Master.

Step 1. Open Qiling Disk Master, choose Clone, and then select Disk Clone.

Choose Disk Clone in Qiling Disk Master

Step 2. Select the source disk and click Next.

Select the source disk

Step 3. Select the destination disk and confirm that its data will be replaced.

Select the destination disk

Step 4. Choose the clone mode and keep the boot partitions on the target.

Choose the clone mode and keep the boot partitions

Step 5. Click Proceed, wait for the copy to finish, then shut the machine down before you remove any cable.

Monitor the clone progress bar until the task finishes

Verify and Boot from the Clone

If the cloned Linux disk stops at a boot prompt, reinstall the bootloader with grub-install on the new device. The files are usually intact, and the boot record is the part that needs a second pass.

FAQs About dd Cloning

Is the dd command safe for cloning a live system?

Not for the disk you are running from. Boot from a live USB so nothing writes to the source while dd reads it.

How long does a dd clone take?

It is limited by the slower of the two drives. A 1 TB copy on SATA hardware usually runs for a few hours.

Why does dd report fewer bytes than the source size?

The target was smaller than the source, or the copy stopped early. Check both capacities before running it again.

Can dd clone a disk to a larger disk?

Yes, but the extra space stays unallocated. Resize the partition afterwards with parted or GParted.

Does dd preserve the boot sector?

It copies it exactly. That works for identical hardware, while a different disk often needs grub-install or a boot repair.

Back Up Before You Clone

A dd command writes without confirmation, so one wrong device name erases a disk. Keep an image of the source on a separate drive before you type the command.

Watch the video tutorial below to back up Windows and restore it if the clone fails.

Step 1. Open Qiling Disk Master and select System Backup to include the boot partitions.

Select System Backup in Qiling Disk Master

Step 2. Save the image to a drive other than the target disk and start the backup.

Choose a folder on another drive for the system image

Step 3. Click Proceed to start the system backup and wait patiently until it finishes. You can also tick Shut down the computer when the operation is completed to power off automatically.

Watch the system backup progress until it finishes

Step 4. If the clone fails, restore the image to the original drive and clone again with the correct settings.

Restore the image with Disk recovery when the clone fails

Conclusion

dd clones a Linux disk in one command and leaves nothing behind, which is why it still earns a place in every recovery toolkit. Read the device names twice, unmount both disks, use a large block size with progress reporting, and verify the byte count before you remove the source. When the disk holds a Windows installation, hand the boot repair to a tool that understands it.

For more on command-line cloning, see Clone a Hard Drive Using Command Prompt, Clone HDD to SSD Without Software, Sector-by-Sector Clone vs Intelligent Clone, and Best Free Disk Cloning Software in 2026.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!


QilingTech uses cookies to ensure you get the best experience on our website.  Learn more  Got it