How to Move Your Linux home Directory to Another Drive
Want to move your Linux home folder to another drive? Here’s a straightforward and step by step way to do it that should work on any distribution. Moving your home folder means you can reinstall Linux and not have to worry about your personal files.
Why Keep Your home Folder Separate?
If you’re setting up a new machine or adding a hard drive to an existing one, you may want to have your home directory on a different drive than the default location.
An increasingly popular configuration for modern personal computers is to have a medium-sized Solid State Drive (SSD) holding your operating system and a larger Solid State Hybrid Drive (SSHD) or traditional hard drive (HD) as your the main storage for data. Or you may have a single traditional hard drive in your system, and you’ve added a new HD for increased storage. Whatever your reasons, here is a simple and blow by blow run-through of moving your home directory.
By the way, if you’re installing a Linux system from scratch, you’ll probably see an option to create a separate home directory in your Linux distribution’s installer. Generally, you’ll just need to go into the partitioning options, create a separate partition, and mount it at “/home”. But, if you’ve already installed a Linux distribution, you can use these instructions to move your current home directory to a new location without losing anything or reinstalling your operating system.
Now, before we start, go and make a backup.
RELATED: How to Back Up Your Linux System
Identify the Drive
If you’ve just fitted a drive to a Linux computer, or installed Linux to one of the drives in a new multi-drive computer, and rebooted, there’s little evidence that the new drive is even present.
The fdisk
command will list the drives and their partitions for us.
sudo fdisk -l