The /home Directory Explained

The /home Directory Explained

If /etc is where the system keeps its configuration and /var is where it keeps its runtime data, /home is where the actual humans using the machine keep everything that belongs to them. It is the directory you will spend the most time in on any interactive Linux system, and understanding how it is organized makes a lot of day-to-day behavior easier to reason about.

What lives inside /home

Every regular user account gets a subdirectory under /home, generally named to match the username:

ls -la /home
# drwxr-xr-x  colton
# drwxr-xr-x  alice

Inside each user’s directory sits everything personal to that account: documents, downloads, pictures, desktop shortcuts, and a large collection of hidden configuration files and folders. A typical listing with hidden files shown looks like this:

ls -la ~
# .bashrc        .config/       .ssh/          Documents/
# .bash_history  .cache/        .local/        Downloads/
# .profile       .mozilla/      .gnupg/        Pictures/

Anything prefixed with a dot is a dotfile, hidden from a plain ls but shown with ls -a or ls -la. These store per-application and per-shell settings scoped to that one user, which is why two people logged into the same machine can have completely different shell prompts, browser bookmarks, and terminal color schemes.

Why user data is kept separate from the system

The Filesystem Hierarchy Standard deliberately separates /home from the directories that make the operating system function, like /usr, /etc, and /var. This separation exists for a practical reason: it lets you reinstall, repair, or completely replace the operating system without losing personal files.

# Check whether /home is its own partition
findmnt /home
df -h /home

# If it shows the same device as /, home is not separate
df -h / /home

On a fresh installation, many distributions offer to put /home on its own partition by default for exactly this reason. If the root filesystem becomes corrupted, or you decide to switch from Ubuntu to Fedora, a separate /home partition can be preserved and remounted into the new installation, keeping documents, SSH keys, and application settings intact.

Home directory structure in more detail

Beyond the standard user-facing folders (Documents, Downloads, Pictures, and so on, which many desktop environments create automatically), a few dotfiles and dotdirectories are worth knowing:

~/.bashrc        # shell configuration loaded for interactive non-login shells
~/.bash_profile  # shell configuration loaded for login shells
~/.profile       # a more portable alternative to .bash_profile
~/.ssh/          # SSH keys and known_hosts, should be permission 700
~/.config/       # modern convention for application configuration
~/.local/share/  # modern convention for application data files
~/.cache/        # disposable cache data, safe to delete to reclaim space

The .config and .local directories follow the XDG Base Directory specification, a more recent convention that many newer applications use instead of dropping a single dotfile directly in the home directory. This is why some applications create ~/.appname while others create ~/.config/appname; both patterns coexist because adoption of the XDG standard happened gradually across the ecosystem.

Permissions on home directories

By default, each user’s home directory is readable only by that user and the system, not by other regular users:

ls -ld /home/colton
# drwxr-x--- 20 colton colton 4096 Jul  9 10:02 /home/colton

The 700 or 750 permission is standard: the owner gets full access, and either nobody else or only the owning group can even list the contents. This keeps one user’s files private from another user on a shared, multi-user system, which is one of the core assumptions Linux was built around from the beginning.

# Fix overly permissive home directory permissions
chmod 750 /home/colton

# Check who owns a home directory (should match the username)
stat -c '%U:%G' /home/colton

Managing space inside /home

Because /home accumulates downloads, virtual machine images, container layers, and media files over time, it is a common place to run low on disk space:

# Total size of your home directory
du -sh ~

# Sorted breakdown of subfolders by size
du -sh ~/* 2>/dev/null | sort -h

# Interactive disk usage browser (if installed)
ncdu ~

If /home is on its own partition and it fills up, only user-facing operations are affected; the rest of the system, including logging in as root through a different account, generally keeps working. This is another benefit of the separation: a runaway download filling /home does not take down system services the way a full root partition can.

Moving /home to a new partition

It is possible to relocate /home after installation, though it takes care to avoid breaking permissions:

# 1. Boot from a live USB (so /home is not in active use)
# 2. Create and format the new partition
mkfs.ext4 /dev/sdb1

# 3. Mount it temporarily and copy existing data, preserving ownership
mount /dev/sdb1 /mnt/newhome
rsync -aHAX /home/ /mnt/newhome/

# 4. Update /etc/fstab with the new partition's UUID
blkid /dev/sdb1
# Add a line like: UUID=xxxx-xxxx /home ext4 defaults 0 2

# 5. Reboot and verify
findmnt /home

The -a flag in rsync preserves permissions, ownership, and timestamps, while -H, -A, and -X preserve hard links, ACLs, and extended attributes respectively. Skipping these flags is the most common mistake, since a plain copy can silently strip ownership information and lock users out of their own files after the migration.

Frequently Asked Questions

What is the /home directory used for?

The /home directory holds the personal files and settings for every regular user account on a Linux system. Each user gets their own subdirectory, typically named after their username, such as /home/colton. Inside that subdirectory lives everything the user creates or configures: documents, downloads, desktop settings, browser profiles, and application configuration files, usually stored as hidden dotfiles.

Why does /home often get its own disk partition?

Putting /home on a separate partition from the rest of the operating system means user data survives a full operating system reinstall or upgrade. If something goes wrong with the root filesystem or you want to switch distributions, you can reformat the root partition without touching the /home partition, then mount it back into the fresh install. It also isolates user file growth (large downloads, virtual machine images, backups) from filling the partition that the system itself depends on to boot and run services.

What is the difference between /home and /root?

/home contains the personal directories for all regular (non-root) user accounts, one subdirectory per user. /root is a single directory reserved specifically for the root superuser account, and it lives directly under / rather than under /home. This separation means the superuser account still has a working home directory even if the /home partition fails to mount.

What are dotfiles and why are they in my home directory?

Dotfiles are configuration files and directories whose names start with a dot, such as .bashrc, .config, or .ssh. The leading dot makes them hidden from a normal ls listing, though ls -a reveals them. They store per-user settings for the shell, applications, and command-line tools. Because they live inside the user home directory rather than in system-wide /etc, each user can have completely different configurations on the same machine.

How do I see how much space my home directory is using?

Run du -sh ~ to get the total size of your home directory, or du -sh ~/* | sort -h to see a sorted breakdown of the largest subfolders. The ncdu command provides an interactive, navigable view if it is installed. This is useful before deciding what to delete, archive, or move to external storage when a home partition starts running low on space.

Can I move /home to a different partition or disk after installation?

Yes, though it requires care. The general process is to boot from a live USB, create and format the new partition, copy the existing /home contents over with a tool like rsync that preserves permissions and ownership, update /etc/fstab with the new partition’s UUID and mount point, and then verify everything mounts correctly before removing the old copy. Skipping the permission-preserving copy step is the most common mistake, since it can leave users unable to access their own files afterward.