how to go back a directory in terminal code example
Example 1: how to move up in terminal
cd .. # one up
cd ../ # two up
cd # home directory
cd / # root directory
cd "yaya-13" # use quotes if the file name contains punctuation or spaces
Example 2: move into folder cmd
The cd command can be used to change into a subdirectory,
cd subdirectory_name -> To go one level into subdir
cd subdirectory_name/subsubdirectory_name -> To go two levels into subdir
move back into the parent directory,
cd ..\ -> To go back one level
cd ..\..\ -> To go back two levels
move to previos directory,
cd -
move all the way back to the root directory or move to any
given directory
cd C:/Give_Path_to_directory
Example 3: how to step back in the path in temrinal
cd ~ or cd -
Example 4: how to go back to the last directory in linux
/
* File & Directory Commands *
To navigate into the root directory, use */ "cd /" "cd" "cd ~" "cd .." "cd -"