TracksPractical Coding FoundationsUsing the TerminalNavigating Folders(2 of 6)

Navigating Folders

In a graphical file explorer, you click folders to open them. In the terminal, you type commands instead. This might feel slower at first, but with practice, navigating by keyboard becomes faster than clicking — especially when you know exactly where you want to go.

Knowing Where You Are

Before moving anywhere, you need to know your current location. The terminal always operates from a specific folder, called your working directory.

Type pwd (print working directory) and press Enter:

This shows the full path to your current folder.

In PowerShell, pwd works the same way. In Command Prompt, just type cd with no arguments to see your current location.

Listing What's Here

To see what files and folders exist in your current location, use the list command:

In PowerShell, use ls or dir. In Command Prompt, use dir.

Changing Directories

The cd command (change directory) moves you into a different folder:

Essential Navigation Shortcuts

These patterns work across all systems:

  • cd foldername — Move into a folder
  • cd .. — Go up one level (to the parent folder)
  • cd ~ — Jump to your home directory (macOS/Linux) or cd $HOME (PowerShell)
  • cd / — Go to the root of the file system

You can also chain them: cd ../other-folder goes up one level, then into "other-folder."

Building Navigation Habits

Think of pwd, ls, and cd as your constant companions. Whenever you feel lost, run pwd to see where you are, then ls to see what's around you. This "look around" habit prevents confusion and builds confidence.

With practice, you'll navigate your file system without thinking — your fingers will type the commands automatically while your mind focuses on the actual work.

See More

Further Reading

You need to be signed in to leave a comment and join the discussion