How to use cd command

subject: Commands · date: 2017-12-07

  • Go to the given directory:

    $ cd <path/to/directory>
    $ cd /usr/share/doc         # for example
    
  • Go to home directory of current user:

    $ cd
    
  • Go up to the parent of the current directory:

    $ cd ..
    
  • Go to the previously chosen directory:

    $ cd -
    

more articles

share this article