Consider that cd-ing into something is to enter in a pathname. There are either absolute pathnames (manually-inputted directories) or relative pathnames (facilitated by the use of a period or periods.)
For instance, the directory that holds the applications in Linux is /usr/bin.
- To get there, I cd to it.
- Now you are in the directory /usr/bin. But say you wanted to leave the directory back to the home directory. It's simple as writing...
1. cd ../..
*Here I wrote the relative pathname, using double periods (..) to go back a directory and back again.
The / represents the home directory.
*returns you to default.
- Say you want to go back to the /usr/bin again.
The easiest way to do this is use a relative pathname.
- To return to a previous directory (like a backward button on web browsers), we write cd -