~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/user

ls – List Contents


Use ls to list the contents of the current directory:


ls Desktop Documents Downloads Music

cd – Change Directory


To move between directories:


cd /usr/bin
pwd
/usr/bin

Absolute vs Relative Paths


  • Absolute path: starts from / and follows full directory hierarchy.
  • Relative path: starts from current directory using special symbols:

SymbolMeaning
.Current directory
..Parent directory

Examples


Move from /usr/bin to /usr using both styles:


cd /usr    # absolute
cd .. # relative

Move from /usr to /usr/bin:


cd /usr/bin    # absolute
cd bin # relative (from /usr)

Filename Rules in Linux


  • Hidden files start with ., shown via ls -a
  • File names are case-sensitive: File1file1
  • Avoid spaces—use underscores (_) instead
  • Linux doesn’t require file extensions to determine type

cd Shortcuts


ShortcutAction
cdGo to current user's home directory
cd -Return to previous directory
cd ~usernameNavigate 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