2

There is a // directory present in Linux. What does it mean & why it is required?

root@tryit-session:~#
root@tryit-knowing:~# cd /                                                                                                                                                                 
root@tryit-knowing:/# pwd                                                                                                                                                                  
/                                                                                                                                                                                          
root@tryit-knowing:/# cd //                                                                                                                                                                
root@tryit-knowing://# pwd                                                                                                                                                                 
//                                                                                                                                                                                         
root@tryit-knowing://# cd ////                                                                                                                                                             
root@tryit-knowing:/# pwd                                                                                                                                                                  
/             
Aserre
  • 4,916
  • 5
  • 33
  • 56
Girish
  • 366
  • 3
  • 15
  • Not sure but it refers to the same root directory. If you create a file in //, you will see it in / as well – abhishek phukan Oct 16 '17 at 08:37
  • [It's defined as implementation-specific in POSIX](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_11) : "A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner" – Aaron Oct 16 '17 at 09:06
  • Also, an example of implementation where `//` is useful : Cygwin, where it can be used to access SMB drives (taken from [this Unix&Linux SE answer](https://unix.stackexchange.com/a/12291/139867)) – Aaron Oct 16 '17 at 09:10

0 Answers0