Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Interesting; when I do bash -c 'cd //; /bin/pwd', I get //.  Cygwin (8.23-4) with bash version 4.1.17(9)-release and pwd (GNU coreutils) 8.23.  Even more surprising, I still get // if I do /bin/pwd -P. Commented Oct 29, 2015 at 20:49
  • For the record, fish does not do this. If you run cd //; pwd, or fish -c 'cd //; pwd', you get /, and if you run the former with a default prompt, the prompt has just 1 slash. Commented Sep 29, 2016 at 15:02
  • @trysis Nor do zsh, ksh, pdksh, dash, hush, … Of the shells commonly found on Linux, bash is the only one that preserves a leading //. Commented Sep 29, 2016 at 16:15