Special Paths

  • /: root directory - where it all begins

  • ~: home directory of the user

    $ id -u
    1000
    $ id -un
    jfasch
    $ pwd
    /etc
    $ cd ~
    $ pwd
    /home/jfasch
    
  • ~someone-else: home directory of someone else

  • .: current working directory

    $ pwd
    /home/jfasch
    $ cd .
    $ pwd
    /home/jfasch
    
  • ..: parent directory of CWD

    $ cd ..
    $ pwd
    /home
    
    $ ls -l
    total 0
    drwx------. 1 jfasch       jfasch       554 Mar  8 10:51 jfasch
    drwx------. 1 someone-else someone-else  92 Mar  3 14:12 someone-else
    

    . and .. are regular path components …

    $ cd ~jfasch/../someone-else
    $ pwd
    /home/someone-else