How to Clone a Partition or Hard drive in Linux

First lets show all partitions in system:

fdisk -l

Now clone a partition /dev/sdb1/ to /dev/sdc1 using the following dd command.

dd if=/dev/sdb1  of=/dev/sdc1

The above command tells dd to use /dev/sdb1 as input file and write it to output file /dev/sdc1.

How to Clone Linux Hard Drive

Cloning a Linux hard drive is similar to cloning a partition. However, instead of specifying the partition, you just use the entire drive. Note that in this case it is recommended that the hard drive is same in size (or bigger) than the source drive.

dd if=/dev/sdb of=/dev/sdc

This should have copied the drive /dev/sdb with its partitions on the target hard drive /dev/sdc. You can verify the changes by listing both drives with fdisk command.

fdisk -l

One thought on “How to Clone a Partition or Hard drive in Linux”

  1. Like!! Really appreciate you sharing this blog post.Really thank you! Keep writing.

Comments are closed.