
Follow ZDNET: Add us as a preferred source on Google.
ZDNET key takeaways
- Hopping to a different distro doesn't mean you have to lose data.
- There are three options you can try.
- Make sure to test these before you do it.
Are you feeling that eternal pull to jump to a different Linux distribution? It happens. I've gone through that experience so many times that I've lost count.
Migrating from one distribution to another isn't all that hard… Unless you want to retain all of the data within your home directory (or any directory, for that matter). If you don't do something to save that data, you will lose out and have to start all over.
Also: I replaced Windows with Linux, and there's only one feature I miss
You don't want that (unless you have nothing of importance in your home directory).
What you can do depends on your setup and needs.
The best way to switch distributions and keep your data
Linux is so well designed that you can install the operating system in such a way that your home directory can be easily migrated from one distribution to another.
How you do this is to partition the distribution so that your home directory is on a separate partition from the OS.
Also: This is my favorite Linux distro of all time – and I've tried them all
Let me show you the basics of how this is done, demonstrating on the latest release of Ubuntu. Before you even start the installation, you should either make sure there's a second disk in your machine or connect an external SSD (with a cable fast enough to handle data transmission). To do this, walk through the installation as you normally would until you reach the Disk Setup section.
When you're presented with the two routes of setting up your disk, select “Manual installation.” In the resulting window, you should see your drive listed. If you have a secondary drive, it should be listed as well.
Also: My 5 favorite Linux distros that are ready to use out of the box (no setup required)
Select the secondary disk and then click +. When prompted, configure the size you want to use for the /home partition, select /home from the Mount Point drop-down, and then click OK.
After that, repeat the process, only this time select the primary drive, click +, and configure the mount point as /. Make sure to allocate the amount of space you want for the partition (quite possibly the entire drive), and click OK and then Next.
At this point, finish the installation as you would normally.
Now that you've configured your /home partition to be on a separate disk, you can hop distributions whenever you want, making sure to install the OS on the primary drive.
Backups
The other method for saving your data is via backups. That's right, the old backup routine.
As for backing up /home, you don't want to back up the entire directory. Instead, back up your user directory within /home (such as /home/jack) to an external drive (even a USB flash drive). You can either back up everything in that directory, or only the folders containing the data/files you want to save.
Do keep in mind, however, that there are hidden folders that contain app configurations, caches, and other bits. Because of that, I would recommend backing up everything in your home directory.
Also: I'm a command-line pro and this is the best terminal app I've ever used, thanks to AI
If you're not sure which backup tool to use, I recommend Déjà Dup, TimeShift, or Lucky Backup (each of which can be installed from the standard repositories).
Once you have that taken care of, make sure to back up any other important data, although the most important data on a desktop machine will be in your home directory.
You can now install the new OS. I would make sure to create your home directory on a secondary drive, so you don't have to go through this the next time you hop.
After the installation completes, reboot, connect the drive housing the data, open your file manager, and start copying things over.
Also: My top 5 user-friendly GUI backup tools for the Linux desktop (and why you need one)
Do not simply copy your user directory from the secondary drive to the /home directory on the primary drive, as you could run into permissions or ownership issues.
A hybrid
There's another option that's a sort of hybrid. Let's say you've copied your important directories from your /home to an external (or secondary internal) drive.
Also: Want to save your aging computer? Try these 5 Linux distributions
Instead of copying those directories, you can simply link them. Let's say you've copied everything in ~/Documents to a secondary drive that is mounted at /media/jack/drive1/, and you want to link your ~/Documents directory with it.
First, delete the ~/Documents directory (assuming it's empty) with the command:
rm -rf ~/Documents
Next, issue the following command from your original home directory:
ln -s /media/jack/drive1/Documents /home/jack/drive1/Documents
You should now see a new ~/Documents directory, containing everything in /media/jack/drive1/Documents.
And there you have it.
My last suggestion is that you test these methods on a spare machine. On top of that, no matter which route you take, always back up your data.








