Quick Tip
Seamlessly Jump to Parent Directories with `cd -`
Challenge: You’ve navigated deep into a directory structure and now need to quickly return to the directory you were in just before. Manually typing the previous path can be tedious.
The Solution: Use the special `-` argument with the `cd` command.
cd -
Why it works: The `cd -` command interprets `-` as a reference to the previous working directory ($OLDPWD). It not only changes to that directory but also prints the new current directory to the terminal.
Pro-Tip: For more advanced directory jumping and keeping track of your most frequently used directories, consider using `zoxide` or `autojump`.
Linux Tips & Tricks | © ngelinux.com | 5/11/2026
