Skip to main content

Command Palette

Search for a command to run...

I Thought Linux Was Just Commands Until I Explored Its File System

Updated
6 min read

I could navigate folders, create files, and run programs. But one day I asked myself a simple question:

"Where does Linux actually store all the information that makes the system work?"

That question led me into a small investigation.

Instead of practicing commands, I started exploring the Linux file system to understand how the operating system works behind the scenes.

What I discovered was surprising.

Almost everything in Linux is represented as a file.

In this blog, I will share some interesting discoveries I found while exploring a real Linux system and explain why they matter

The Problem

Most beginners learn Linux commands but never understand what is happening behind them.

For example:

  • How does Linux know which users exist?

  • Where are network settings stored?

  • How does DNS work?

  • How does Linux know which process is running?

  • Where are logs stored when something goes wrong?

The answer to many of these questions is hidden inside the Linux file system.

Let's explore.

1. The /etc Directory - The Brain of System Configuration

One of the first directories I explored was /etc.

At first, it looked like a collection of random files.

But after spending some time there, I realized that this directory controls a huge part of Linux behavior.

Examples:

  • User accounts

  • DNS settings

  • Hostnames

  • Services

  • Network configurations

Why does it exist?

Linux needs a central place to store configuration files.

Instead of hiding settings inside applications, Linux stores them as readable text files.

What problem does it solve?

Administrators can easily modify system behavior without changing program code.

Interesting insight

Many important system settings are just simple text files that can be opened and understood by humans.

2. User Management Inside /etc/passwd

I always wondered where Linux stores user information.

The answer was inside:

/etc/passwd

This file contains information about every user account on the system.

Why does it exist?

Linux needs a database of users.

What problem does it solve?

It allows Linux to identify users and manage permissions.

Interesting insight

Every user on the system has an entry inside a plain text file.

Something as important as user management is stored in a format that humans can read.

3. DNS Configuration Inside /etc/resolv.conf

Whenever we open a website like Google, we type a name instead of an IP address.

Linux needs DNS servers to translate names into IP addresses.

I found that information inside:

/etc/resolv.conf

Why does it exist?

Linux must know which DNS server to contact.

What problem does it solve?

Without DNS, users would need to remember IP addresses for every website.

Interesting insight

Internet browsing depends on a tiny configuration file containing DNS server information.

A small change here can affect the entire machine's internet access.

4. System Logs Inside /var/log

I wanted to know where Linux stores information about system activities and errors.

The answer was:

/var/log

This directory contains logs generated by the system and applications.

Why does it exist?

Systems need records of what happened.

What problem does it solve?

When something breaks, administrators can investigate the logs.

Interesting insight

Logs are like the diary of a Linux system.

Almost every important event leaves a trace here.

5. The Amazing /proc Directory

This was probably the most surprising discovery.

When I opened /proc, I expected normal files.

Instead, I found files that seemed to change constantly.

Why does it exist?

Linux needs a way to expose real-time kernel and process information.

What problem does it solve?

Programs can access system information without directly communicating with the kernel.

Interesting insight

Many files inside /proc don't actually exist on disk.

Linux creates them dynamically while the system is running.

It feels like reading the operating system's live thoughts.

6. Running Processes Have Their Own Directories

Inside /proc, every running process gets its own folder.

Each folder contains information such as:

  • Memory usage

  • Open files

  • Process status

  • Environment variables

Why does it exist?

Linux needs a structured way to manage processes.

What problem does it solve?

Administrators and monitoring tools can inspect running applications.

Interesting insight

Every running application leaves a footprint inside the file system.

Processes are not hidden; they are visible and inspectable.

7. Devices Inside /dev

Another discovery completely changed my understanding of Linux.

Inside /dev, hardware devices appear as files.

Examples:

  • Hard drives

  • Terminals

  • USB devices

Why does it exist?

Linux follows the philosophy that "everything is a file."

What problem does it solve?

Programs can interact with hardware using the same file-based interface.

Interesting insight

In Linux, talking to hardware often looks similar to reading or writing a file.

This design makes the operating system simpler and more consistent.

8. Boot Files Inside /boot

I explored the /boot directory to understand how Linux starts.

This directory contains files needed during system startup.

Why does it exist?

Linux needs startup information before the rest of the system loads.

What problem does it solve?

It allows the operating system to initialize correctly.

Interesting insight

Without the files inside /boot, Linux would not even know how to begin loading itself.

9. System Services Inside /etc/systemd

Modern Linux systems use systemd to manage services.

I found service definitions stored inside systemd-related directories.

Examples:

  • Web servers

  • Database services

  • Scheduled services

Why does it exist?

Linux needs a way to automatically start and manage services.

What problem does it solve?

Services can start, stop, restart, and recover automatically.

Interesting insight

Many background services we never notice are controlled through simple configuration files.

10. Environment Variables and System Behavior

I discovered that environment settings influence how programs run.

Some configuration files define:

  • Search paths

  • Default commands

  • Application behavior

Why does it exist?

Programs need contextual information.

What problem does it solve?

It allows applications to adapt without changing code.

Interesting insight

A small environment variable can completely change how a program behaves.

What I Learned

Before this exploration, Linux looked like a collection of commands.

After exploring the file system, I realized Linux is more like a giant organized database where everything has a place.

Some of the biggest lessons I learned were:

  • Configuration is mostly stored in text files.

  • System logs help investigate problems.

  • Running processes expose information through /proc.

  • Hardware devices appear as files inside /dev.

  • Networking behavior depends on configuration files.

  • Services are controlled through structured configuration directories.

  • Linux strongly follows the idea that everything can be represented as a file.