Kahibaro
Discord Login Register

Important directories

How to Think About “Important” Directories

You’ve already seen the big idea of the Linux filesystem (single root /, everything is a file). Here, the goal is to get a practical mental map of the directories you’ll touch most often as a beginner, and what kinds of things you can expect to find there.

Think of this as a “tour” of the standard layout: not every tiny detail, just enough to know where to look and what not to break.

We’ll focus on:

Subdirectories like /home, /etc, /var, etc. have their own chapters; here we’ll place them in context and cover other key directories briefly.

The Root Directory `/`

Everything on a Linux system lives somewhere under /.

At the top level, you’ll commonly see directories such as:

Your desktop file manager or terminal ls / will show you these.

You don’t need to memorize them all at once. It’s more useful to know what kind of stuff goes in each, so the names start to make sense.

`/bin` — Essential User Commands

What this means for you:

Note: On modern systems, /bin may be merged with /usr/bin (they can be the same directory via symlink), but the idea remains: core user commands.

`/sbin` — System Administration Commands

You normally run these via sudo, because many of them change system-wide settings.

As a beginner:

`/boot` — Boot Loader and Kernel Files

Why it matters:

As a beginner, treat /boot as look but don’t touch, unless following specific instructions.

`/dev` — Device Files

Key points:

Practical example:

You do not create or delete these manually; udev and the kernel manage them.

`/etc` — System Configuration

(Has its own detailed chapter; here’s the position in the bigger picture.)

As a beginner:

Be cautious: syntax errors in /etc configs can break services or even prevent login/boot.

`/home` — Users’ Home Directories

(Covered in depth in its own chapter.)

It’s your space:

`/lib`, `/lib64` — Shared Libraries

Conceptually similar to:

As a beginner:

`/media` and `/mnt` — Mount Points

These are places where other filesystems get attached (mounted) into the main tree.

`/media`

Usually managed automatically by your desktop environment.

`/mnt`

For beginners:

`/mnt` vs `/media` vs Other Mount Points

You may also see custom mount points in other locations, e.g.:

The core idea:

`/opt` — Optional Add‑On Software

For a beginner:

`/proc` — Pseudo Filesystem for Processes and Kernel Info

(Covered more in its own later chapter, but here’s where it fits.)

Typical beginner uses:

You don’t edit files here unless following very specific, advanced instructions.

`/root` — Home Directory for the Root User

Why separate?

As a beginner:

`/run` — Volatile Runtime Data

For example:

Typically, you won’t manipulate /run directly. Tools and services manage it automatically.

`/srv` — Service Data

If you later run a server, you may see /srv used as the root for service content.

`/sys` — Sysfs: Kernel Device and System Info

(Also expanded later in its own chapter.)

Typical usage for beginners is indirect:

As a new user, treat /sys as read-only unless you’re following careful documentation.

`/tmp` — Temporary Files

As a beginner:

`/usr` — User-Space Programs and Data

This is one of the largest and most important trees.

Conceptually:

Inside /usr, you’ll commonly see:

For you:

You normally don’t change files in /usr manually; the package manager is responsible for this area.

`/var` — Variable Data

(Has its own dedicated chapter; here is the high-level idea.)

Common issues:

How to Use This Knowledge in Practice

You don’t need to remember every detail. More useful is to:

  1. Recognize the pattern of what lives where:
    • Binaries: /bin, /sbin, /usr/bin, /usr/sbin
    • Configs: /etc
    • User data: /home
    • Logs and variable data: /var
    • Temporary: /tmp, /run
    • Devices and kernel info: /dev, /proc, /sys
    • Optional/third-party: /opt
    • Mount points: /mnt, /media, sometimes /srv
  2. Be cautious in system directories:
    • Don’t delete or move things under /bin, /sbin, /lib*, /usr, /etc unless you know why.
    • Do your experiments and projects under your home directory, e.g. /home/yourname/projects.
  3. Use commands to explore (read-only at first):
    • ls / to see top-level directories
    • ls /etc, ls /usr/bin | head for a taste of what’s inside
    • du -sh /var/* (with sudo if needed) to see which subdirectories use space

Over time, these directories will stop being mysterious labels and start to feel like familiar neighborhoods in a small city.

Views: 17

Comments

Please login to add a comment.

Don't have an account? Register now!