Going Home
Explore how to quickly return to your home directory from any location in the file system using the command-line interface. Understand the use of the tilde symbol and shortcuts that simplify navigation and boost productivity in terminal environments.
We'll cover the following...
Overview
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.