This content originally appeared on DEV Community and was authored by Sonu Kumar Kushwaha
The Role of the Slash (/) in Linux
In Linux and other Unix-like systems, / is the directory separator — everything starts from the root directory /.
Examples: /etc, /var, /home.
Now here’s the fun part:
According to the POSIX standard, Linux treats multiple consecutive slashes as a single slash — except possibly at the very beginning of a path.
That means:
/home
//home
///home
All point to the same directory.
The One Special Case
Some Unix variants (like older AIX or NFS systems) use // at the start of a path to indicate network namespaces or special mounts, similar to how Windows uses \server\share.
Modern Linux usually ignores this distinction.
This content originally appeared on DEV Community and was authored by Sonu Kumar Kushwaha
Sonu Kumar Kushwaha | Sciencx (2025-10-21T04:35:29+00:00) The Role of the Slash (/) in Linux. Retrieved from https://www.scien.cx/2025/10/21/the-role-of-the-slash-in-linux/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.