Skip to main content

Command Palette

Search for a command to run...

Linux file System

Updated
•5 min read•View as Markdown
Linux file System

Most people interact with Linux through commands, scripts, or applications. But beneath that surface lies a highly structured and transparent system where everything is exposed through files. This assignment pushed me to go beyond commands and explore Linux as a living system — where configuration, processes, networking, and even hardware are represented inside the filesystem.

Here are the most interesting discoveries I made while investigating Linux under the hood.


1. /etc — The Brain of System Configuration

The /etc directory is where Linux stores almost all system-wide configuration files.

What it does

It contains configs for networking, users, services, DNS, and more.

Why it exists

Instead of hiding configurations inside binaries, Linux exposes them as editable files.

What problem it solves

It gives administrators full control without needing proprietary tools.

Insight

Linux is designed with transparency in mind. You’re not guessing system behavior—you can literally read it.

Example:

  • /etc/hosts → local DNS overrides

  • /etc/resolv.conf → DNS servers

  • /etc/passwd → user accounts


2. DNS Configuration — /etc/resolv.conf

This file defines how your system resolves domain names.

What it does

Specifies nameservers (DNS servers).

Why it exists

Your system needs a way to translate domain names into IP addresses.

What problem it solves

Without DNS, you'd need to remember IP addresses for every website.

Insight

Changing one line here can redirect your entire internet resolution behavior. It’s powerful—and dangerous if misconfigured.


3. /proc — A Live Window Into the Kernel

This is not a normal directory. It’s a virtual filesystem generated by the kernel.

What it does

Provides real-time information about processes and system state.

Why it exists

To expose kernel data without requiring special tools.

What problem it solves

Developers and admins can inspect running processes and system metrics easily.

Insight

Each process has its own folder (/proc/<pid>). You can literally inspect a running process like reading a file—this is mind-blowing.

Examples:

  • /proc/cpuinfo → CPU details

  • /proc/meminfo → memory usage

  • /proc/<pid>/status → process info


4. /dev — Everything is a Device

Linux treats hardware as files.

What it does

Represents devices like disks, terminals, and input devices.

Why it exists

To unify hardware interaction under the same file abstraction.

What problem it solves

Developers don’t need special APIs for hardware—just read/write files.

Insight

Even your keyboard and hard drive are just files. This design simplifies everything.

Examples:

  • /dev/sda → hard disk

  • /dev/null → black hole (discards data)


5. System Logs — /var/log

This is where Linux records everything happening in the system.

What it does

Stores logs for system events, services, errors, and security.

Why it exists

To provide traceability and debugging capabilities.

What problem it solves

When something breaks, logs tell you why.

Insight

Logs are like a system diary. Reading them feels like replaying system history.

Examples:

  • /var/log/syslog → general logs

  • /var/log/auth.log → authentication events


6. User Management — /etc/passwd & /etc/shadow

User data isn’t hidden—it’s stored in plain files.

What it does

  • /etc/passwd → user details

  • /etc/shadow → encrypted passwords

Why it exists

To manage authentication and user identity.

What problem it solves

Separates public user info from sensitive password data.

Insight

Passwords aren’t stored in plain text (good), but access to /etc/shadow is highly restricted—highlighting Linux’s layered security model.


7. Permissions — The Foundation of Linux Security

Every file has permissions: read, write, execute.

What it does

Controls who can access or modify files.

Why it exists

Multi-user systems need strict access control.

What problem it solves

Prevents unauthorized access and system damage.

Insight

Permissions aren’t just security—they define system behavior. A script won’t run unless it’s executable.


8. Networking Internals — /etc/network & /proc/net

Linux exposes networking in multiple layers.

What it does

  • /etc/network → configuration

  • /proc/net → runtime networking info

Why it exists

To separate static config from live state.

What problem it solves

Admins can both configure and monitor networking.

Insight

Routing tables, interfaces, and connections can all be inspected without external tools—Linux is extremely introspectable.


9. Boot Process — /boot

This directory contains files required to start the system.

What it does

Stores kernel images and bootloader configs.

Why it exists

System needs instructions to initialize hardware and load OS.

What problem it solves

Provides a structured way to manage multiple kernels and boot options.

Insight

Linux can boot different kernels just by switching files—this flexibility is rare in other OS ecosystems.


10. System Services — /etc/systemd

Modern Linux uses systemd to manage services.

What it does

Defines how services start, stop, and behave.

Why it exists

To standardize service management.

What problem it solves

Ensures consistent startup and dependency handling.

Insight

Services are just configuration files. You can control system behavior by editing text—not clicking UI.


Linux is Designed to Be Understood

The biggest realization from this exploration:

Linux doesn’t hide complexity—it exposes it in a structured way.

  • Hardware → files

  • Processes → files

  • Configuration → files

  • System state → files

This design makes Linux incredibly powerful for developers and system engineers. Instead of relying on black-box tools, you can investigate, debug, and control everything directly.

2 views