A home directory, also called a home folder, is the private directory that an operating system assigns to each user account as its default location for personal files, configuration and application data. In operating systems that serve several people, the home directory is the main place where the separation of user accounts becomes visible on disk: each user owns one directory tree, and file permissions keep other standard users out of it.
The concept originated in multi-user Unix systems and now exists in every mainstream desktop platform. Linux places homes under /home, macOS under /Users, and Windows under C:\Users. The path is recorded in the account database, so programs never need to guess it; they ask the system, read the HOME or USERPROFILE environment variable, or use the shorthand ~ in a shell.
How the operating system creates and assigns a home directory
The operating system creates a home directory when the account is first provisioned or first logs in, copies a template of default files into it and makes the new user its owner. On Linux, useradd -m copies the contents of /etc/skel; on Windows, the first sign-in builds the folder from the Default profile; on macOS, a localized user template is used.
At every login, the system reads the home path from the account record (the sixth field of /etc/passwd, the directory service entry, or the Windows ProfileList registry key), sets it as the current working directory of the session and exports it to processes. Every program started by that user inherits this value, which is why configuration files can be found reliably.
The table below lists where each major platform keeps home directories and how software refers to them.
| Platform | Default path | How programs find it |
|---|---|---|
| Linux | /home/username | HOME variable, /etc/passwd entry |
| macOS | /Users/username | HOME variable, directory services |
| Windows | C:\Users\username | USERPROFILE variable, known folder API |
| Root on Linux | /root | HOME variable for UID 0 |
| FreeBSD | /home/username (often a link to /usr/home) | HOME variable, password database |
What a home directory contains
A home directory holds two kinds of content: visible document folders that the user manages directly and hidden configuration data that applications manage on the user’s behalf. Keeping both inside one tree means that backing up, migrating or deleting a single directory captures almost everything that belongs to one person.
Platform conventions differ, but the categories are consistent, as the following table shows.
| Category | Linux example | Windows example | Purpose |
|---|---|---|---|
| User documents | ~/Documents | Documents | Files the user creates |
| Application settings | ~/.config | AppData\Roaming | Preferences that follow the user |
| Local caches | ~/.cache | AppData\Local | Rebuildable machine-specific data |
| Shell and session files | ~/.bashrc, ~/.profile | NTUSER.DAT | Startup scripts and the user registry hive |
| Credentials and keys | ~/.ssh, ~/.gnupg | Credential Manager vaults | Private keys and stored secrets |
On Linux, the XDG Base Directory Specification defines where configuration, data, state and cache files belong, which reduces the clutter of dot-files directly in the home root. On Windows, the NTUSER.DAT file inside the home folder stores the user’s registry hive, so the directory is far more than a document store.
Home directory compared with related concepts
A home directory is a filesystem location, while closely related concepts in the User accounts topic describe identities, settings or shared areas. Confusing them leads to errors in backup scripts and permission design.
| Concept | What it is | Relationship to the home directory |
|---|---|---|
| User account | An identity with credentials and rights | Owns exactly one home directory |
| User profile | The settings and data set of one account | Stored mostly inside the home directory |
| Working directory | The current folder of a running process | Starts at home but changes freely |
| Shared folder | A location writable by several users | Lives outside individual homes |
| Root directory | The top of the filesystem hierarchy | Contains the parent of all homes |
On Windows, the terms home folder and profile folder are often used interchangeably, but Active Directory also has a separate homeDirectory attribute that maps a network drive letter, which is a different mechanism from the local profile path.
Permissions, privacy and isolation
Isolation of home directories depends entirely on access control settings, not on the location itself. The owner receives full control, and other standard users should receive no read access; an administrator account can still override these rights, so a home directory protects users from each other but not from administrators.
- On Linux, a mode of 700 or 750 keeps other users out; some distributions historically defaulted to 755, which allowed everyone to list and read files.
- On Windows, the profile folder grants access to the owner, SYSTEM and the Administrators group through inherited ACL entries.
- On macOS, subfolders such as Documents and Desktop are additionally protected by privacy consent prompts for applications.
Encryption adds a second layer. Full-disk encryption protects every home at rest, while per-user encryption such as systemd-homed or the older eCryptfs approach keeps one home unreadable even to someone with physical access to the disk until that user signs in.
Administering home directories in practice
Administrators make a few recurring decisions about home directories: where they live, how large they may grow and what happens to them when an account is removed. Each choice affects backup size, roaming behavior and data retention.
| Situation | Recommended approach | Reason |
|---|---|---|
| Many users on one disk | Apply a disk quota per home | Prevents one user from filling the volume |
| Users moving between machines | Mount homes over NFS or use folder redirection | Keeps data identical on every workstation |
| Small system disk | Place homes on a separate partition | Allows reinstalling the system without data loss |
| Account deletion | Archive the home before removal | Preserves data for legal or handover needs |
| Shared lab computers | Reset guest homes at logout | Prevents leftover personal data |
Renaming a user does not automatically rename the home path on most systems. On Windows in particular, changing a profile path by hand requires editing the ProfileList entry and fixing hard-coded paths in applications, so it is usually avoided.
Common mistakes and failure modes
Most home directory problems arise from ownership, path or space errors rather than from the concept itself. The symptoms are often confusing because the system cannot load settings it expects to find.
- Wrong ownership after copying: restoring files as root leaves them owned by root, and the user cannot write settings; fixing ownership recursively solves it.
- Full home volume: applications fail to save settings and some desktop sessions refuse to start.
- Corrupted Windows profile: a damaged NTUSER.DAT leads to a temporary profile at sign-in, and changes vanish after logout.
- Hard-coded paths in scripts: writing
/home/aliceinstead of$HOMEbreaks on macOS and for any renamed account.
A non-technical view
A home directory is like a personal locker in a shared building. Everyone who uses the computer gets their own locker, labeled with their name, and only they hold the key. Their photos, documents and the way they like their programs set up all go inside.
When someone signs in, the computer opens their locker automatically. When someone else signs in, they see their own locker and not the first person’s. The one exception is the building manager, the administrator, who has a master key. The key point is simple: your home directory is where your things live, and copying it means copying almost everything that makes the computer feel like yours.
A concrete example
A university computer lab runs 40 Linux workstations used by about 2,000 students. Instead of storing files on each machine, the IT team keeps all home directories on a central file server and mounts them over NFS at /home when a student signs in. Each home receives a quota of 5 GB and a permission mode of 700.
A student who saves an assignment on one workstation can sign in on any other workstation the next day and find the same files, browser bookmarks and editor settings. When one student filled their quota with video files, only their own session failed to save data, while the other 39 machines and every other user continued normally. The outcome was predictable storage, consistent settings on every seat and a single server to back up each night.