~2 min read • Updated Jul 18, 2025
Introduction
As a Unix-based system, Linux has a unique file system layout compared to Windows. Understanding how to navigate directories and manage files is essential for working on the command line. In this article, we cover the basics of file system navigation using pwd, ls, and cd.
Linux File System Structure
Linux uses a single hierarchical tree to manage files. Unlike Windows, where each storage drive has its own file system (C:, D:, etc.), Linux mounts all devices into a unified directory tree rooted at /.
pwd – Display Current Directory
The pwd command shows your current location in the file system:
pwd
/home/userls – List Contents
Use ls to list the contents of the current directory:
ls Desktop Documents Downloads Musiccd – Change Directory
To move between directories:
cd /usr/bin
pwd
/usr/binAbsolute vs Relative Paths
- Absolute path: starts from
/and follows full directory hierarchy. - Relative path: starts from current directory using special symbols:
| Symbol | Meaning |
|---|---|
. | Current directory |
.. | Parent directory |
Examples
Move from /usr/bin to /usr using both styles:
cd /usr # absolute
cd .. # relativeMove from /usr to /usr/bin:
cd /usr/bin # absolute
cd bin # relative (from /usr)Filename Rules in Linux
- Hidden files start with
., shown vials -a - File names are case-sensitive:
File1≠file1 - Avoid spaces—use underscores (
_) instead - Linux doesn’t require file extensions to determine type
cd Shortcuts
| Shortcut | Action |
|---|---|
cd | Go to current user's home directory |
cd - | Return to previous directory |
cd ~username | Navigate to another user's home |
Conclusion
Linux provides a powerful and flexible directory structure. Understanding how to use pwd, ls, and cd—along with absolute and relative paths and filename conventions—will help users navigate the system efficiently and confidently.
Written & researched by Dr. Shahin Siami