Do You Need a Home Partition When Using Linux?

A home partition offers an additional degree of protection for your files

Most Linux distributions support, by default, reorganizing disk space into three partitions during the Linux installation process:

  1. Root: Non-swap partition where the filesystem goes and required to boot a Linux system.
  2. Home: Holds user and configuration files separate from the operating system files.
  3. Swap: When the system runs out of RAM, the operating system moves inactive pages from RAM into this partition.

Of these, the home and swap partitions have, in recent years, become more controversial.

Linux home and root on the same partition

Do You Need a Separate Home Partition?

If you've installed Ubuntu and chose the default options while installing Ubuntu, you won't have a home partition. Ubuntu generally creates just two partitions—root and swap.

The main reason for having a home partition is to separate your user files and configuration files from the operating system files. By separating your operating system files from your user files, you're free to upgrade your operating system without the risk of losing your photos, music, videos, and other data.

Other reasons it's better to create a separate home partition:

  • Migrating to a large home partition later is much easier.
  • If you store a very large number of small files in your home folder, it could slow overall access to the root filesystem files as well.
  • If the home partition completely fills up, the file system won't crash.
  • In the case of a failed system upgrade, all data on your home partition remains safe.
  • Reinstalling the OS is much faster when all data files are on a separate home partition.
  • Some swap and file system areas like temporary files or swap files are accessed frequently. Storing the home partition on a fast SSD drive and keeping swap and root partitions on a standard drive can extend the life of your SSD drive. Be aware, however that dependent upon use, this can also substantially slow down the system—ruining a LOT of the benefit of a solid state drive, and the whole reason for putting one in.

The Ubuntu Default Partition Structure

Ubuntu root directory structure

So why doesn't Ubuntu give you a separate home partition by default?

Ubuntu instantiates a home folder and under the home folder, you'll find sub-folders for music, photos, and videos. All your user-specific configuration files store in your home folder. (They're hidden by default). This structure matches the documents-and-settings setup that has been part of Windows for so long.

Not all Linux distributions behave similarly and some might not provide a consistent upgrade path. Some may require you to re-install the operating system to get to a later version. In this case, having a home partition is useful as it saves you copying all of your files off the machine and then back again afterward.

Just because you have a separate home partition doesn't mean that you no longer need to do backups. Any partition can fail, and maintaining a backup protects all of your important files on the home partition.

How Big Should the Home Partition Be?

If you only plan to install one Linux distribution on your computer, then your home partition can be set to the size of your hard drive minus the size of the root partition and the size of the swap partition.

For example, if you use a 100-gigabyte hard drive, create a 20-gigabyte root partition for the operating system and an 8-gigabyte swap file. This allocation leaves 72 gigabytes for a home partition.

However, remember that your root partition must also have enough space for any programs you're planning to install. For a home system with (web browser, music player, word processor), ~25-30GB should be fine—but with modern drives being relatively cheap, why not do 50-60GB?

Also, it's probably a good idea to have a swap partition that's about equal to the size of your RAM. This way, you know there's room in the swap partition for things like hibernating your computer.

If you have Windows installed and you are dual booting with Linux then you might choose to do something different.

It's difficult to read Linux partitions using Windows. Accordingly, creating a massive home partition is not the way to go. Instead, create a modest home partition for storing configurations files (say a maximum of 1 gigabyte). Then, create a FAT32 partition for the rest of the disk space to store music, photos, videos, and other files. This FAT32 partition can be accessed from either operating system.

What About Dual-Booting Linux with Linux?

When you dual-boot several Linux distributions, you can share one home partition among them all if you accommodate a few technical provisions. The biggest? Software versions. Different distributions use different versions of major applications. Because user-specific configuration files write to the home directory, using distributions with out-of-sync applications may lead to the corruption of files or to their outright loss.

Was this page helpful?