Navigate between Directories

After learning this lesson, you'll be able to switch and navigate between directories with ease.



cd — short for “change directory” — is used to change Shell’s current working directory. We use this command frequently to work around the hierarchy of our file system. This command is similar to chdir command in MS-DOS.


cd [option] [directory_name]


Option Meaning
/ To change the current directory to Root directory
-L This mode lets cd move directly to the directory the link is pointing to
-P This mode is opposite of -L. It uses physical directories and does not follow symbolic links
-e This option is only used to show an error in case the cd command fails to determine the directory


  • To move from current directory to parent directory

cd ..

Get hands-on with 1200+ tech skills courses.