Your cart is currently empty!
How To Move Home Directory To New Partition Or Disk In Linux
If you’re running low on space or setting up a more efficient Linux system, moving your /home directory to a separate partition or disk is a smart move. It keeps user data separate from system files, making upgrades and backups simpler. Here’s a step-by-step guide to do it safely.
Why Move /home?
- Separate user data from system files
- Simpler OS reinstalls and upgrades
- Improved disk space management
- Easier backups and recovery
What You’ll Need
- A new partition or disk ready to use
- Root or sudo access
- A reliable backup (always have one)
Step 1: Prepare the New Partition or Disk
First, find the new disk or partition using:
lsblkIf the new disk isn’t formatted yet, format it with a Linux filesystem (e.g., ext4):
sudo mkfs.ext4 /dev/sdXnReplace
/dev/sdXnwith your actual partition name.
Create a mount point:
sudo mkdir /mnt/newhomeMount the new partition:
sudo mount /dev/sdXn /mnt/newhomeStep 2: Copy /home to the New Location
Use rsync to preserve permissions, symlinks, and ownerships:
sudo rsync -avx /home/ /mnt/newhome/Double-check the contents with:
ls /mnt/newhomeStep 3: Update /etc/fstab
Find the UUID of the new partition:
sudo blkid /dev/sdXnEdit /etc/fstab:
sudo nano /etc/fstabAdd a line like this at the end:
UUID=your-uuid-here /home ext4 defaults 0 2Replace your-uuid-here with the actual UUID from blkid.
Step 4: Finalize the Move
Before rebooting, rename your current /home and mount the new one:
sudo mv /home /home.bak
sudo mkdir /home
sudo mount -aIf all went well:
ls /homeYou should see your users’ home directories.
Step 5: Reboot and Clean Up
Now reboot:
sudo rebootIf everything works fine, you can delete the old /home backup:
sudo rm -rf /home.bakTroubleshooting Tips
- If something goes wrong, you can restore the old home with:
sudo rm -rf /home sudo mv /home.bak /home - Double-check
fstabsyntax. A bad line can prevent your system from booting.
Final Thoughts
Moving /home to a separate partition is a one-time effort that pays off with better organization and peace of mind. Just remember to back up, double-check each step, and never rush.
Got questions or hit a snag? Drop a comment below.

Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!
