REW

What Is The Difference Between Home And Home In Linux?

Published Aug 29, 2025 4 min read
On this page

The distinction between ~ and /home is that ~ is a dynamic, user-specific shortcut for the current user's home directory, whereas /home is a static, system-wide directory that contains the home directories for most regular users.

For example, if the username is "alice," then:

  • ~ expands to /home/alice.
  • /home is the parent directory that contains /home/alice and other users' home directories.

Here's an extensive breakdown of the differences.

~ (Tilde): A dynamic shell expansion

The tilde (~) is a powerful shortcut expanded by your command-line shell (e.g., Bash) to point to the current user's home directory. This means its value changes depending on who is logged in.

Key characteristics of ~:

  • User-specific: If user "bob" types cd ~, they will be taken to /home/bob. If user "susan" does the same, they go to /home/susan.
  • A shell feature: The tilde is not part of the Linux filesystem itself. It's a convenience feature of the shell that translates into an absolute path before the command is executed.
  • Variable-based: The shell determines the tilde's value from the $HOME environment variable, which is set when a user logs in. If $HOME is changed, the tilde's destination changes as well.
  • Works with other users: You can also use the tilde with another user's name to specify their home directory (e.g., cd ~susan will take you to /home/susan, provided you have the correct permissions).
  • Usage in paths: The tilde is commonly used to access subdirectories and files within the home directory (e.g., ~/Documents is the same as /home/username/Documents).

/home: A static, system-level directory

The /home directory is a standard part of the Linux filesystem hierarchy, as defined by the Filesystem Hierarchy Standard (FHS). It is the designated location for storing the personal directories of non-privileged users.

Key characteristics of /home:

  • Centralized location: It acts as a central storage point for all standard user home directories on the system.
  • Filesystem structure: /home is a real, static directory within the overall filesystem, unlike ~, which is a dynamic shortcut.
  • Permissions: The /home directory itself is typically owned by the root user, with permissions that prevent regular users from creating files or directories directly inside it. Each subdirectory (e.g., /home/alice) is owned by its respective user.
  • Not universal for all users: While it holds the home directories for most regular users, it does not hold the home directory for the superuser, root. The root user's home directory is typically /root.
  • Separable partition: For security and convenience, system administrators can place /home on a separate disk partition. This allows user data to be preserved if the main system needs to be reinstalled.

Comparison at a glance

Feature ~ (Tilde) /home
Type A shell shortcut or expansion. A physical, top-level directory in the filesystem.
Scope Expands to the current user's personal home directory. Contains the home directories for all regular users.
Location It represents a specific user's home directory. For a user named "john," this is /home/john. It is the parent directory for all standard user directories.
Usage Used for navigation and scripting to reference the current user's files easily (e.g., cd ~/Documents). The fixed, full path to the directory, used for system administration and managing all user accounts.
User context Dynamic, changes based on which user is logged in. Static, its location is fixed in the filesystem.

Practical examples

To illustrate the difference, imagine you have a Linux system with two users: "neo" and "trinity."

Scenario: User "neo" is logged in

  • pwd (print working directory) would likely show: /home/neo
  • echo $HOME would show: /home/neo
  • cd ~ would take "neo" to: /home/neo
  • cd /home would take "neo" to: the /home directory, where they could see the directories for "neo" and "trinity" (depending on permissions).
  • cd ~trinity would take "neo" to: /home/trinity (permissions permitting).

Scenario: User "trinity" is logged in

  • pwd would likely show: /home/trinity
  • echo $HOME would show: /home/trinity
  • cd ~ would take "trinity" to: /home/trinity
  • cd /home would take "trinity" to: the /home directory, where they could see the directories for "neo" and "trinity".
  • cd ~neo would take "trinity" to: /home/neo (permissions permitting).

As these examples show, ~ is a relative, flexible symbol, while /home is an absolute, fixed directory in the Linux file hierarchy.

Enjoyed this article? Share it with a friend.