How to Quickly Navigate Directories in Ubuntu Terminal (Command Line)

MuhammedMuhammed
1 min read

Navigating directories in Ubuntu's terminal can be smooth and speedy with a few simple commands. If you’re in one folder but need to jump to another, just use cd followed by the path.

For example, to get to your home directory, type cd ~. If you’re jumping back to the previous directory, cd - will save you a bit of typing.

Another tip: if you’re going up just one level, a quick cd .. does the trick. And for those nested directories you don’t feel like typing out, hit Tab after a few characters to autocomplete the path.

Here are a few examples of navigating (directory) paths:

  1. Home Directory: cd ~/Documents
    This command takes you directly to the "Documents" folder in your home directory.

  2. Absolute Path: cd /usr/local/bin
    This uses the full path to jump straight to the "bin" folder inside "local," which is within the "usr" directory.

  3. Relative Path: cd ../Downloads
    If you’re in your home directory’s "Documents" folder, this command will go up one level (with ..) and then into "Downloads."

0
Subscribe to my newsletter

Read articles from Muhammed directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Muhammed
Muhammed