Navigating folders in the Linux terminal comes down to a handful of core commands that let you move around the file system, check where you are, and jump back when needed. Once these become second nature, working from the command line is often faster than clicking through a file manager.
The cd Command Is Your Main Tool
The cd (change directory) command is how you move from one folder to another. The basic syntax looks like this:
cd /path/to/folder
For example, to move into a folder called Documents inside your home directory, you’d type:
cd ~/Documents
The tilde (~) is shorthand for your home directory, so you don’t have to type out the full path every time.
Absolute vs. Relative Paths
There are two ways to tell cd where to go:
- Absolute paths start from the root of the file system and always begin with a
/, like cd /var/www/html. These work no matter where you currently are in the terminal.
- Relative paths are based on your current location. If you’re in
/home/user and want to reach /home/user/projects, you can simply type cd projects instead of the full path.
Useful Shortcuts
A few shortcuts make navigation much quicker:
cd .. — moves up one directory level (into the parent folder)
cd ../.. — moves up two levels at once
cd ~ or just cd with no arguments — jumps straight back to your home directory
cd - — takes you back to the previous directory you were in, which is handy for toggling between two folders
Checking Where You Are
If you’re ever unsure of your current location, pwd (print working directory) shows the full path of the folder you’re in:
pwd
Seeing What’s in a Folder
Before or after navigating, it helps to see what’s actually inside a directory using ls:
ls
Adding -la (ls -la) shows a more detailed list, including hidden files (anything starting with a dot) and file permissions.
Autocomplete Saves Time
Typing out long folder names is rarely necessary. Start typing the first few letters of a folder name after cd, then press Tab, and the terminal will autocomplete it for you. If there are multiple matches, pressing Tab twice will list all the possibilities.
Putting It Together
A typical navigation sequence might look like this:
pwd
ls
cd Downloads
pwd
cd ..
This checks your current location, lists what’s there, moves into a Downloads folder, confirms the new location, then moves back up one level.
Join The Discussion
Terminal navigation is one of those skills that feels clunky at first but becomes muscle memory surprisingly fast. Do you rely mostly on relative paths and shortcuts like cd -, or do you prefer typing out full absolute paths for clarity? And if you’ve picked up any lesser-known navigation tricks — aliases, custom functions, or tools like zoxide or fzf — we’d love to hear what’s made your terminal workflow faster.