Skip to main content

Command Palette

Search for a command to run...

Master the 🐧 Linux Filesystem: Inspect /boot, /etc, /dev, /var and More

Updated
4 min read
Master the 🐧 Linux Filesystem: Inspect /boot, /etc, /dev, /var and More

If you really want to understand a system running on Linux, you don’t always need fancy tools.

Sometimes… all you need is curiosity and the filesystem.

Linux follows a powerful philosophy: “everything is a file.” And once you start hunting through these files, you begin to uncover how the entire system works — from booting to networking to running processes.

Let’s explore what that actually looks like 👇


🌳 The Root of Everything: /

Every Linux system starts from a single root directory:

/

From here, everything branches out into well-defined directories following the Filesystem Hierarchy Standard (FHS).

Some of the most important ones:

  • /boot → Kernel & bootloader files

  • /etc → Configuration files

  • /dev → Device files

  • /usr → Installed programs

  • /var → Logs and runtime data

  • /home → User directories

Think of this as the map of the system.


⚙️ /etc — The Control Room

If Linux had a “settings panel,” it would be /etc.

This directory controls how your system behaves.

Some key files:

  • /etc/hostname → System name

  • /etc/hosts → Local DNS mappings

  • /etc/resolv.conf → DNS servers

  • /etc/fstab → Disk mount configuration

  • /etc/ssh/sshd_config → SSH settings

👉 The powerful part? These are just plain text files.

Edit them → reboot or reload → behavior changes.

That’s it.


🌐 Networking Through Files

You don’t need ifconfig or ip commands to understand networking.

Linux exposes everything via files:

  • /proc/net/route → Routing table

  • /proc/net/arp → ARP cache

  • /sys/class/net/ → Interface details

Want to check your gateway? Just read /proc/net/route.

Want MAC address? Check /sys/class/net/eth0/address.

👉 It’s like debugging the network by reading files.


🔍 /proc — The Live System Mirror

This is where things get interesting.

/proc is a virtual filesystem that shows the current state of the system.

Each running process gets its own directory:

/proc/<pid>/

Inside you’ll find:

  • cmdline → How the process started

  • exe → Executable path

  • fd/ → Open files

  • environ → Environment variables

Example:

  • /proc/cpuinfo → CPU details

  • /proc/meminfo → Memory usage

👉 Tools like ps literally read from /proc behind the scenes.

So when you explore /proc, you're basically talking directly to the kernel.


🧩 /sys and /dev — Hardware in Action

Linux doesn’t hide hardware—it exposes it.

/sys → Hardware View

  • Shows devices, drivers, and system components

  • Example: /sys/class/net/ → Network devices

/dev → Device Access

  • /dev/sda → Hard disk

  • /dev/null → Black hole for data 😄

  • /dev/random → Random generator

👉 Plug in a USB → a new file appears in /dev.

That’s Linux saying: “Here’s your device.”


🚀 /boot — Where It All Begins

This directory holds everything needed to start the system:

  • vmlinuz → Linux kernel

  • initrd / initramfs → Temporary root filesystem

  • grub → Bootloader configs

The system loads these during startup to bring everything to life.

👉 Want to know which kernel you’re using? Check /boot.


📜 /var/log — The System’s Memory

If something goes wrong, logs tell the story.

Important files:

  • /var/log/syslog → General logs

  • /var/log/auth.log → Login attempts

  • /var/log/kern.log → Kernel messages

Modern systems also use journald for structured logs.

👉 Debugging tip: Logs are often the first place to look.


👤 Users, Permissions & Security

Linux security is deeply tied to files:

  • /etc/passwd → User accounts

  • /etc/shadow → Password hashes

  • /etc/sudoers → Admin privileges

And permissions matter:

  • /tmp1777 (sticky bit)

  • passwd command → SUID enabled

👉 Example:

-rwsr-xr-x

That s means the program runs with elevated privileges.


🧠 The Big Insight

After exploring all this, one thing becomes clear:

The Linux filesystem is not just storage — it is the system.

  • /etc → Defines behavior

  • /proc & /sys → Show live state

  • /var/log → Records history

You don’t always need tools.

Sometimes, just:

cat
less
grep

…is enough to understand everything.


🚀 Final Thoughts

“Filesystem hunting” is one of the most underrated skills in Linux.

It teaches you to:

  • Think like the system

  • Debug without tools

  • Understand deeply, not just operate

And once you get comfortable with it…

👉 You stop using Linux 👉 And start understanding Linux