On most Linux systems, a regular user’s home directory is /home/username, where username is the account name. The administrator account, called root, usually has the separate home directory /root; to find the exact path for your own account, check the $HOME environment variable or your account record.
The usual Linux home directory path
Linux commonly stores ordinary users’ home directories inside /home. For example, a user named Maya might have the path /home/maya, while an account named alex might use /home/alex. The complete path begins at the filesystem root, written as a single forward slash: /.
A home directory is the user’s personal place for files and settings. It is not the same thing as the filesystem root, and it is not necessarily where a terminal is currently working. When a user signs in, the shell often starts in that user’s home directory, which is why the two can seem interchangeable at first.
The pattern /home/username is a convention, not a rule that applies to every Linux installation. Some systems place home directories elsewhere, and individual accounts can be configured with custom locations. The actual path in the account configuration is more reliable than guessing from the username.
Why the path can differ
Linux distributions and administrators can organize user accounts in different ways. A desktop installation may use the familiar /home/name pattern, while a server may mount users’ home directories from a separate disk or network storage. A system that has been upgraded, migrated, or configured for a workplace may also preserve a nonstandard location.
In the account database, each user has a home-directory field. That field can point to a path such as /users/name, /srv/home/name, or a directory on a mounted filesystem. The home directory might even be supplied by a network service rather than stored on the computer’s local disk. In those cases, the path still identifies the user’s home from the system’s perspective, even though its contents are stored elsewhere.
There are also special-purpose environments. A container, virtual machine, or Windows Subsystem for Linux installation has its own Linux filesystem and account configuration, so its home path may not correspond to a Windows profile folder or a directory on the host. A live USB system may use temporary or persistent storage depending on how it was set up. These are reasons to inspect the current environment rather than assume that every Linux user lives under the same directory.
How Linux identifies your home
Linux account information includes a home-directory path for each local user. The system’s user and group lookup service can provide that information, whether accounts are stored locally or obtained from another configured source. When a login session starts, the login software and shell use the account details to establish the user’s environment.
Most shells also expose the current user’s home path through the environment variable HOME. In a typical Bash or Zsh session, entering echo "$HOME" prints that value. The dollar sign means the shell should substitute the value of the variable. For example, if HOME is /home/maya, then echo "$HOME" displays /home/maya.
The tilde character is a related shortcut. A shell usually expands ~ to the current user’s home directory, so cd ~ changes to that directory and ls ~/Documents lists a Documents folder beneath it. In many shells, ~alex refers to the home directory of the user named alex. Tilde expansion is a shell feature, however; it is not a literal directory name that every program interprets in the same way.
How to check the exact path
Use one of these methods to identify the directory for the account or session you are using:
printf '%s\n' "$HOME"prints the home path stored in the current shell environment.cdfollowed bypwdtakes you to the home directory and prints the resulting current path.pwdalone only reports the directory you are currently in.getent passwd "$USER"looks up the current account. In the output, the home-directory path is the second-to-last colon-separated field; the last field is typically the login shell.getent passwd username, with an actual account name in place ofusername, checks another account if your permissions and system configuration allow the lookup.
For example, a record may look like maya:x:1000:1000:Maya:/home/maya:/bin/bash. The fields are separated by colons, and /home/maya is the home-directory field. The x shown here is not a password; password hashes are normally kept in a protected file or supplied by another account service.
For a quick check in a graphical file manager, choose the Home location or press the appropriate shortcut for your desktop. That is convenient, but a terminal command is more useful when diagnosing scripts, remote sessions, or accounts with unusual settings.
Home directory, filesystem root, and root user
Three terms that sound similar have different meanings. The filesystem root is /, the top of the Linux directory tree. A regular user’s home is typically a directory below /home. The root user is the privileged administrative account, whose home is usually /root.
For example, /home/maya is Maya’s home, while /root is root’s home. Neither is the same as /. The root account can access system files and perform administrative operations, but its home directory is still just a directory in the filesystem. Using sudo to run a command as root does not necessarily change the terminal’s current directory, and it does not mean that the regular user’s files have moved to /root.
There is another distinction between a home directory and the current working directory. The current working directory is where a command looks when you provide a relative path such as notes.txt. It may be the home directory, but it could instead be /var/log, a project folder, or anywhere else. Run pwd to see the current working directory, and inspect HOME to see the environment’s home setting.
What is stored in a home directory
A home directory can hold personal documents, downloads, photographs, source code, and other user-created files. It commonly also contains hidden files and directories whose names begin with a dot. In a graphical file manager, hidden items may be concealed until you enable the show-hidden-files option; in a terminal, ls -a includes them in its listing.
Hidden items often contain configuration or application data. Examples include .config for many application settings, .ssh for SSH-related files, and shell startup files such as .bashrc for Bash. Modern applications may also use locations defined by the XDG Base Directory specification, including ~/.config for configuration and ~/.local/share for user data. Exact use varies by application.
Because these files can include preferences, credentials, or keys, the home directory is more than a convenient folder for documents. Backing it up can preserve both personal files and settings, but copying every hidden file to another system can also transfer stale or incompatible configuration. For a backup, consider what you need to preserve and protect sensitive files appropriately.
Permissions and access
Linux file permissions control who can read, change, or enter files and directories. A home directory is generally owned by its user, and its permissions may restrict access by other ordinary accounts. The exact permissions depend on the distribution, administrator choices, and how the directory was created. Do not assume that every home directory is completely private from all other users or from administrators.
Check the ownership and permissions of a path with ls -ld "$HOME". The output shows the directory’s owner, group, and permission bits. If you cannot open a file or save into a directory, check its ownership and permissions before changing them. Commands such as chmod and chown can have broad effects, especially when applied recursively, so avoid copying permission-fixing commands without understanding which path they affect.
Applications run as your account normally need write access to the relevant parts of your home. Running a graphical application with administrative privileges can sometimes create files owned by root in a user’s home, leading to later permission errors. Prefer the application’s normal user mode unless there is a specific administrative task that requires elevated privileges.
Changing a home directory safely
It is possible to assign an account a different home path, but changing the value alone does not automatically move existing files or ensure that the new location is mounted and writable. The account record, directory contents, ownership, permissions, and login environment all need to agree. A mistaken change can prevent a user from signing in normally or make applications behave as though their files have disappeared.
On systems that use the standard user-management tools, an administrator may use usermod with options such as -d to set a home path and -m to move existing contents. The correct procedure depends on the distribution, storage setup, and whether the user is logged in. Consult the system’s documentation and make a verified backup before changing an established account. For a new account, it is usually simpler to specify the intended home location when creating the account.
Do not try to change a home directory merely by assigning a different value to HOME in a shell startup file. That changes an environment variable for sessions that read the file; it does not update the account database, relocate files, or alter other login services. It can also cause confusing differences between terminal sessions and graphical applications.
Common path problems and misconceptions
If echo "$HOME" prints nothing, the variable may be unset or the command may be running in an unusual environment. Check the account lookup with getent passwd "$USER", and confirm which user and shell are active. Services, scripts, containers, and restricted sessions may not have the same environment as an interactive desktop login.
If cd ~ works but a program cannot find a path written as ~/file, the program may not perform shell expansion. The shell expands a tilde before it launches most commands, but a program that receives a path directly from a configuration file or another interface may treat the tilde as an ordinary character. Use an absolute path such as /home/maya/file, or use a documented variable expansion feature supported by that program.
A frequent misconception is that every Linux home path must begin with /home. Another is that /root is the home directory for all users when they use administrative commands. In fact, a user’s configured home may differ from the common convention, and invoking a command with elevated privileges does not by itself redefine that user’s home. When a command needs a particular account’s home, check the command’s behavior and the target account rather than relying on an assumption.
Frequently Asked Questions
What is the default Linux home directory path?
For most regular accounts, the common pattern is /home/username. The exact location can be customized, so check echo "$HOME" or the account record to confirm it.
How do I go to my home directory in Linux?
Run cd with no arguments or use cd ~. Both usually take you to the home directory associated with your current shell account.
Is /home the same as /root?
No. /home commonly contains regular users’ home directories, while /root is usually the home directory of the privileged root account. The filesystem root is a third thing: /.
How can I find another user’s home directory?
Try getent passwd username and read the home-directory field in the result. Whether the account can be looked up depends on the system’s account services and access policies.
Does the tilde character mean the same thing in every program?
No. Shells commonly expand ~ to a home path, but other programs may not. If a program does not recognize it, provide an absolute path or use that program’s supported variable syntax.
Can I move my Linux home directory?
Yes, but it involves more than changing a displayed path. The account configuration, files, ownership, permissions, and storage mounts must be handled correctly; back up important data and follow your distribution’s guidance.