Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In zsh, entering any number of slashes moves me into the root directory, but as I recently noticed, in bash you can cd into // and it actually displays // instead of /.

Afterwards(///.../) it all ends up in /.

Can somebody enlighten me as to what is the difference/meaning of this?

share|improve this question

migrated from Nov 17 '11 at 14:22

This question came from our site for professional and enthusiast programmers.

There is no option to close and migrate to, but this might even be more appropriate than ServerFault. – Bruno Nov 17 '11 at 14:21
Ah, I'm really sorry, I shall be more careful in the future. – Llamageddon Nov 17 '11 at 15:28
up vote 4 down vote accepted

See Pathname resolution

A pathname consisting of a single slash shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash.

Most implementations simply treat // as /, but may still show //.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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