How do I clone my HDD's content to my SSD in Linux or Unix?

This method describes using the dd command line utility which is available in many Linux- and Unix variants. Make sure to adjust your device variables correctly; dd is a powerful tool and can erase your drive if used incorrectly. In this example, a Vector 150 SSD (/dev/sda) is used as source drive, which the Kubuntu install resides on, and a Vector 180 (/dev/sdb), which acts as target drive. To be safe, boot a live environment of Kubuntu using a CD or USB drive. It is highly recommended to use a live environment over doing this while the source OS drive is mounted and being used. /dev/sdc is the USB drive used to boot a live Kubuntu environment from.

Open terminal to check the drives in the system, using sudo lshw -class disk
Kubuntu screenshot

Now, on to cloning by using the command sudo dd if=/dev/sda of=/dev/sdb conv=noerror
Kubuntu screenshot

By this command, dd is issued to clone the “input file” (if) /dev/sda (Vector 150) to the “output file” (of) /dev/sdb (Vector 180), and ignore read errors (noerror).

This may take a while depending on the amount of data you’re cloning. dd doesn’t report its progress, so even if it seems like nothing happens, it’s still busy cloning your drive. Once done, dd will report it.

After the process is finished, shut down, and replace your HDD with your SSD.

Did you find this article helpful?