Skip to main content

Command Palette

Search for a command to run...

Linux File System Exploration: Understanding What Happens Behind the Scenes

Updated
5 min read

Most beginners think Linux is just about commands like ls, cd, and mkdir, but the real power of Linux lives inside its file system. Linux follows a philosophy: everything is treated like a file—devices, processes, configurations, logs, and even system behavior. Instead of just using commands, I explored how Linux actually works under the hood by investigating important directories like /etc, /proc, /dev, /boot, and more. This blog covers some of the most meaningful discoveries I found during this Linux hunting exercise.

  1. /etc — The Brain of System Configuration The /etc directory stores most of the system-wide configuration files. It controls how the system behaves, including:

user accounts

DNS settings

hostname

network configuration

services

startup behavior

For example: /etc/hosts/etc/resolv.conf/etc/passwd/etc/fstab/etc/systemd/ Why it exists Linux separates configuration from programs. Instead of hardcoding settings inside software, it stores them in editable files. This makes Linux highly customizable. What problem it solves It allows administrators to manage the entire system without modifying application code. Interesting insight I learned that changing a simple text file like /etc/hostname can rename the entire machine. Even DNS resolution depends heavily on /etc/resolv.conf. That shows how powerful configuration files are in Linux.

  1. /etc/resolv.conf — Where DNS Magic Happens This file controls DNS (Domain Name System) resolution. Example: nameserver 8.8.8.8nameserver 1.1.1.1 When we type: google.com Linux checks this file to know which DNS server should convert that domain into an IP address. Why it exists Humans remember names better than IP addresses. DNS helps bridge that gap. What problem it solves Without DNS configuration, internet browsing would be painful because we would need to remember raw IP addresses. Interesting insight I discovered that internet problems sometimes are not internet problems—they are DNS problems. A wrong resolv.conf can make the internet “look broken.”

  2. /proc — Live System Information in File Form The /proc directory is one of the most fascinating parts of Linux. It is a virtual filesystem, meaning the files are not stored physically on disk—they are generated dynamically by the kernel. Examples: /proc/cpuinfo/proc/meminfo/proc/uptime/proc/[PID]/ Why it exists Linux exposes system and process information through files so tools can easily read system status. What problem it solves Instead of creating special software APIs for everything, Linux allows direct inspection through readable files. Interesting insight Every running process gets its own folder inside /proc. That means processes are visible like folders. Even system monitoring tools like top and ps depend on this concept. This perfectly shows Linux’s philosophy: everything is a file.

  3. /dev — Hardware Devices as Files The /dev directory contains device files. Examples: /dev/sda/dev/tty/dev/null/dev/random These are not normal files—they represent hardware devices and system interfaces. Why it exists Linux treats hardware communication like file operations. You can read from or write to devices just like files. What problem it solves It creates a unified interface for hardware access. Programs do not need separate logic for every hardware type. Interesting insight /dev/null amazed me. Anything sent there disappears forever. It is basically the “black hole” of Linux. Example: command > /dev/null This hides unwanted output.

  4. /var/log — The System’s Memory This directory stores logs generated by the system and applications. Examples: /var/log/syslog/var/log/auth.log/var/log/dmesg Why it exists Systems need records of what happened. Logs help track failures, logins, errors, and security events. What problem it solves Without logs, debugging would be guesswork. Logs provide evidence. Interesting insight I realized that when servers fail, logs are often the first place professionals check. Linux remembers almost everything. It is like CCTV footage for the system.

  5. /etc/passwd and /etc/shadow — User Management Secrets Linux stores user account information inside: /etc/passwd/etc/shadow /etc/passwd stores:

username

user ID

home directory

default shell

/etc/shadow stores encrypted passwords. Why it exists The system needs a structured way to manage users securely. What problem it solves It separates public account details from sensitive password data. Interesting insight I learned that passwords are not stored in /etc/passwd anymore for security reasons. That responsibility moved to /etc/shadow, which only privileged users can access. This separation improves security significantly.

  1. /boot — Where Linux Starts The /boot directory contains files needed during system startup. Examples: vmlinuzinitrdgrub/ Why it exists Before Linux can run fully, it must load the kernel and bootloader instructions. What problem it solves It ensures the system knows how to start itself. Interesting insight I discovered that GRUB (bootloader) reads its configuration before Linux even starts. That means boot problems often happen before the operating system is running.

  2. /etc/systemd — Service Control Center Modern Linux systems use systemd to manage services. Examples: /etc/systemd/system/ This controls services like:

web servers

databases

SSH

background jobs

Why it exists Systems need automation for starting services during boot and managing them during runtime. What problem it solves It removes manual service management. Servers can run automatically without human intervention. Interesting insight I learned that even if an application is installed, it does not become useful until its service is properly managed. System administration is often more about services than software.

  1. File Permissions — Linux Security Foundation Every file has permissions like: rwxr-xr-- This controls:

who can read

who can write

who can execute

Why it exists Multi-user systems require strong access control. What problem it solves It prevents unauthorized access and protects sensitive data. Interesting insight Even a powerful script becomes useless without execute permission. Security in Linux starts with permissions. One wrong permission can create major vulnerabilities.

Final Thoughts This exploration changed how I see Linux. Earlier, I thought Linux was mainly about commands. Now I understand that commands are only tools—the real system lives inside its files and directories. Linux is transparent. It does not hide how things work. Instead, it exposes everything clearly through the file system. That is what makes Linux powerful for developers, system administrators, and security engineers. The biggest lesson I learned is this: If you want to understand Linux, stop memorizing commands and start investigating the file system. That is where the real learning begins.