FG

Which directory does path `//` represent in Linux?

Fresh3 days ago
Mar 15, 20266108 views
Confidence Score0%
0%

Problem

When I want to go back to upper level directory in Linux by typing , I typo-ed . To my great surprise, no errors are reported. What's more the prompt becomes . indicates that I'm now at root directory. Is this a bug or a feature of the shell? If a feature, is an alias of ? My shell is GNU bash, ver…

Error Output

cd ..

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Which directory does path `//` represent in Linux?

Low Risk

It can be considered either. In Linux, means nothing – multiple consecutive slashes get collapsed to one, anywhere in the path, including the beginning. Changing directory to puts you in , as running would tell; likewise, is collapsed to . However, …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment