DEV Community

Cover image for Mastering the Linux File System – A Beginner's Guide
shamain anjum
shamain anjum

Posted on

3

Mastering the Linux File System – A Beginner's Guide

Welcome back to Day 2 of the 30 Days of Linux Challenge!

Now that you’ve dipped your toes into the terminal and run your first command, it’s time to explore one of the most important parts of the Linux experience: the file system.


📚 Table of Contents


Everything is a File

One of the core philosophies of Linux is:

"Everything is a file."

This includes:

  • Documents and images
  • Directories (folders)
  • Devices like USBs and printers
  • Even running processes

This consistency gives Linux its power and flexibility.


The Root of It All

In Linux, everything starts from a single root directory: /

From here, the entire system branches out. Here are some of the most common directories:

Directory Description
/bin Essential system commands
/etc Configuration files
/home Personal directories for users
/var Logs and variable data
/usr Installed applications and libraries
/tmp Temporary files
/root Home folder of the root user
/dev Represents devices like drives or USBs
/proc Virtual system info files

Navigating Like a Pro

Here are a few commands you'll use daily:

pwd – Show your current directory

Image description

ls
ls -l # Detailed list
ls -a # Show hidden files

Image description

cd /etc # Go to etc folder
cd ~ # Go to your home
cd .. # Move up one directory

Image description

Absolute vs Relative Paths

Absolute vs Relative Paths
Absolute path: Starts from the root
Example: /home/user/documents

Relative path: Based on your current location
Example: cd documents if you’re already in /home/user

Understanding both makes scripting and navigation much smoother.

Why This Matters

Why This Matters
If you're working toward becoming a:

Linux System Admin

DevOps Engineer

Cloud Architect

Or preparing for exams like RHCSA / Red Hat EX200

…then understanding the Linux file system is non-negotiable.

Top comments (0)