Kahibaro
Discord Login Register

`/home`

Why the `/home` Partition Matters

On most Linux systems, /home is where user data lives:

During partitioning, you can choose to:

This chapter focuses on the second option: using a separate /home partition and what that means during installation.

What Actually Goes in `/home`

Every user (except system/service accounts) gets a subdirectory under /home:

Each of these is the user’s “home directory.” It contains:

From a user’s perspective, this is “my stuff.” From an admin’s perspective, this is what you want to protect during system changes.

Reasons to Use a Separate `/home` Partition

You can absolutely use Linux without a dedicated /home partition, but having one gives several benefits.

1. Safer Reinstalls and Distro Changes

If /home is its own partition, you can:

…while keeping your personal data intact, as long as you:

Result: your documents and most application settings can carry over.

2. Protecting Data from System Problems

If something goes wrong with the root filesystem (/):

This separation reduces the chance that a system-level issue will trash your personal files.

3. Easier Backups and Disk Management

A separate /home makes it clearer what needs frequent backup:

You can also:

When a Separate `/home` Partition Might Not Be Needed

It’s also reasonable not to separate /home in some situations:

Many modern installers default to a single large partition (plus swap/EFI) because it’s simpler. You can still keep good backups and be fine.

How Much Space to Allocate for `/home`

This is a planning decision during installation. Some rough guidelines:

You generally:

Remember that this is hard to change later unless you’re comfortable with resizing partitions or using more advanced tools (covered elsewhere).

Creating and Assigning a `/home` Partition During Install

Installers look different, but the basic logic is similar.

Step 1: Create the Partition

In the partitioning screen (often “Something else” or “Manual partitioning”):

  1. Pick free space or shrink an existing partition (if needed).
  2. Create a new partition:
    • Type: usually “Primary” or “Logical” (details vary by disk layout)
    • Filesystem type: typically ext4 for /home on most distros
    • Size: based on your plan (see previous section)

Step 2: Set the Mount Point to `/home`

For the new partition, set:

This tells the installer: “Mount this partition as /home when the system boots.”

If you’re reusing an existing /home:

The installer will then:

Step 3: Check That `/home` and `/` Are Separate

Before you start the actual installation:

This is the main safeguard against accidentally erasing existing /home data.

Permissions and Ownership in `/home`

Each home directory must be owned by its user and usually not readable by others:

The installer usually sets this up automatically when creating the user. If you reuse an existing /home with the same username and UID, ownership should match.

If you:

…you might need to adjust ownership later with tools like chown (covered in other chapters).

Reusing an Existing `/home` Safely

If you’re reinstalling or moving to a new distribution and want to keep your /home:

  1. Backup anyway. A mistake (like formatting the wrong partition) can still destroy data.
  2. During installation:
    • Choose manual partitioning
    • Select the existing /home partition
    • Set mount point: /home
    • Do not select format
  3. Use the same username as before if possible:
    • This helps match existing directory ownership and IDs
  4. After installation, if needed:
    • You can selectively clean up old config (.~ backups, old app configs) if something behaves oddly

Some application settings may not migrate perfectly between very different versions or desktop environments, but your data (documents, photos, etc.) will remain.

Common Pitfalls with `/home` Partitions

Most of these issues are avoidable by:

Verifying Your `/home` After Installation

Once the system is installed and booted:

  1. Open a terminal and run:
    • df -h — to see mounted filesystems and confirm /home is separate
  2. Check your home directory:
    • Make sure it exists under /home/yourusername
    • Confirm your files are there if you reused an existing /home

If it all looks correct, your separate /home partition is ready, and your personal data is now neatly separated from system files.

Views: 15

Comments

Please login to add a comment.

Don't have an account? Register now!