Learn how to return to the home directory using the CLI.
We'll cover the following
No matter where we are, we can execute a single command that will take us back to our home directory. Recall that the tilde (
~) always refers to the home directory. So, if we type
cd ~, we return to our home directory regardless of where we are on the filesystem.
We can save a couple of keystrokes because entering
cd followed by “Enter” will do the same thing.
Both of these methods will always take us back to the home directory, no matter where we are on the filesystem.
Use the terminal below to experiment with these commands.