Lets assume my system has the root ( / ) partition located on "/dev/sda1" and the /home partition is located on "/dev/sda2", Why does "/home" have " / " at the beginning since " / " is on a different partition?

  • 6
    This question is based on the false premise that the / would denote the root partition. This is incorrect, the / denotes the root directory, which by convention is the mount point of the root partition. Mar 11 '17 at 15:51

All pathnames in Unix-like operating systems exist in a single hierachical file system structure inspired by the organization of secondary storage in the Multics operating system.

The hierachical file system is an abstraction that hides away details about the physical storage, such as disk partitions.

The / denotes the start of the abstract tree structure files and directories inhabit. This start point is also called the root directory, which by convention is the mount point of the root partition, which in turn provides the physical storage for the file system. In case a separate partition is used for the user home directories, that partition is mounted at /home/, a directory existing on the root partition. When referring to /home, we are really referring to the mount point relative to the root directory (/), not the home partition per se.

In Unix-like operating systems. Different processes may have different views of the the filesystem, for instance if they're are running in separate chroot environments, in which case / refers to the boundary of the file system hierarchy visible to them.

Compare this other operating systems, such as Windows, where drive letters (such as C:\) denoting the physical partitions are visible in all absolute pathnames. This doesn't abstract away the details about the physical storage, making moving files from one partition to another more difficult, as they partition the file exist on is visible in the way we refer to the file.

Not the answer you're looking for? Browse other questions tagged or ask your own question.