ADVERTISEMENT

Linux Commands ❯ cd

cd

Change the current directory to dir
syntax:

cd [-L|[-P [-e]]] [dir]
  • cd
    change the current directory to HOME directory
  • cd ~
    change the current directory to HOME directory
  • cd -
    change the current directory to OLDPWD( previous working directory)
  • cd ..
    change the current directory to the parent directory
  • cd -L linkto_my_dir1
    change the current directory to linkto_my_dir1 instead to the actual directory my_dir1 to where linkto_mydir1 pointing
  • cd -P linkto_my_dir1
    change the current directory to my_dir1 where linkto_mydir1 points to