Exploring the Linux File System

When I first started using Linux, I thought the main skill was learning commands.ls, cd, mkdir — I assumed that was the core.
But once I actually explored the file system, something clicked.
Linux is not about commands.
It’s about understanding how everything is structured underneath.
What surprised me the most was this:
Almost everything in Linux is represented as a file.
Not just documents, but system behavior, devices, processes, and even networking.
So instead of just practicing commands, I started exploring what these folders actually do and why they exist.
/etc — Where System Behavior is Controlled
At first, /etc just looks like another folder. But once you open it, you realize it controls almost everything.
This directory stores configuration files for the system. Things like DNS, users, services, and networking are all defined here.
Linux does not hardcode behavior. It reads from these files. That means if you want to change how the system behaves, you modify configuration files instead of changing the OS itself.
This makes Linux flexible and predictable.
To explore it:
ls /etc
Output
This output shows how many system-level configurations are stored inside /etc, including networking, services, security, and user-related files. This confirms that Linux relies heavily on configuration files instead of hardcoded behavior.
DNS is Not Magic — It’s Just a File
I always thought DNS was something abstract happening somewhere on the internet.
But Linux literally stores DNS configuration in a file.
The file /etc/resolv.conf contains the DNS server your system uses.
To check it:
cat /etc/resolv.conf
Example output:
nameserver 127.0.0.11
This simply tells the system which server to ask when resolving domain names.
So DNS resolution is not magic. It is just a configuration pointing to a server.
Output
The DNS configuration here shows that the system is using an internal resolver (127.0.0.11). This means DNS resolution is being handled locally (likely by Docker or a container system), which proves that DNS behavior can vary depending on the environment.
/proc — The System, Live and Exposed
The /proc directory looks like a normal folder, but it is actually a virtual filesystem.
It contains live system information. The files here are generated in real time.
To check CPU information:
cat /proc/cpuinfo
To see processes:
ls /proc
Each process has its own folder.
This means Linux exposes internal system state as readable files. You are not reading stored data — you are reading what is happening right now.
The outputs observed here are from an online Linux environment, which shows how Linux exposes real system-level information even in virtualized setups.
Output
The /proc directory contains both numeric folders (representing running processes) and system-level files like cpuinfo, meminfo, and uptime. This confirms that /proc is a live view of the system rather than a normal storage directory.
📍 Image Prompt
"eraser whiteboard style diagram showing /proc as live system layer connected to CPU, memory, processes with dynamic arrows"
/dev — Hardware as Files
In Linux, hardware devices are also treated as files.
Inside /dev, you will find entries for disks, terminals, and other devices.
To explore:
ls /dev
Examples include:
/dev/sda
/dev/tty
This means interacting with hardware is similar to reading or writing files.
This design makes the system consistent and easier to work with.
/var/log — Where the Truth Lives
The /var/log directory stores system logs.
Logs are records of what has happened in the system, such as errors, login attempts, and service activity.
To view logs:
ls /var/log
To inspect system-level information:
cat /proc/cpuinfo
Logs are extremely useful for debugging. Instead of guessing what went wrong, you can read exactly what happened.
Output
The /var/log directory shows different types of system logs such as dpkg.log, apt, and journal, which are useful for debugging. Additionally, the cpuinfo output confirms that system-level hardware details are exposed through the filesystem.
/home — User Space
Each user in Linux has a personal directory inside /home.
To check:
ls /home
Example:
/home/username
This directory contains user files, settings, and projects.
Linux separates user files from system files, which improves both security and organization.
/boot — Where the System Starts
The /boot directory contains files required to start the system.
To explore:
ls /boot
It includes things like the kernel and bootloader configuration.
Without this directory, the system would not be able to start.
Users Are Just Data (/etc/passwd)
User information is stored in a file.
To check:
cat /etc/passwd
Each line represents a user.
This shows that users are not special system objects, but structured entries in a file.
Services Are Managed (systemd)
Linux uses services to manage background processes.
These configurations are stored in system directories like /etc/systemd.
To explore:
ls /etc/systemd
Services define what runs in the background and what starts automatically.
This makes system behavior structured and controlled.
Permissions — The Real Security Layer
Linux controls access using file permissions.
To check permissions:
ls -l
Example output:
-rwxr-xr--
This defines who can read, write, or execute a file.
Security in Linux is enforced at the file level, which keeps things simple and effective.
Conclusion
Exploring the Linux file system made it clear that Linux is not a black box.
It is a transparent system where everything is organized and accessible.
Instead of relying only on commands, understanding the structure gives much deeper control.
And once that clicks, Linux becomes far more logical and powerful to work with.