Linux First-Level Directories

root

Jun 11 2026


When you run ls / on any Linux system you'll see the same familiar set of directories. Here's what each one is for.

/
├── bin/
├── boot/
├── dev/
├── etc/
├── home/
├── lib/
├── media/
├── mnt/
├── opt/
├── proc/
├── root/
├── run/
├── srv/
├── sys/
├── tmp/
├── usr/
└── var/

/bin — Essential Binaries

Contains core command-line programs available to all users, even in recovery mode. Things like ls, cp, mv, cat, and bash live here.

ls /bin   # you'll see hundreds of everyday commands

On modern systems /bin is often a symlink to /usr/bin.


/boot — Boot Files

Holds everything the system needs to start up — the Linux kernel (vmlinuz), the initial RAM disk (initrd), and the bootloader config (GRUB).

Don't touch this unless you know what you're doing.


/dev — Device Files

Every piece of hardware is represented as a file here. Disks, USB drives, terminals — Linux treats them all as files.

/dev/sda      # first hard disk
/dev/null     # the "black hole" — discards anything written to it
/dev/random   # generates random bytes

/etc — Configuration Files

System-wide configuration lives here — plain text files you can read and edit.

/etc/hosts        # maps hostnames to IPs
/etc/fstab        # defines mounted filesystems
/etc/ssh/sshd_config  # SSH server settings
/etc/passwd       # user account info

/home — User Home Directories

Each regular user gets a subfolder here for their personal files, configs, and data.

/home/alice/
/home/bob/

The shortcut ~ always points to the current user's home directory.


/lib — Shared Libraries

Shared code (.so files) used by programs in /bin and /sbin. Similar to DLLs on Windows.


/media — Removable Media

When you plug in a USB drive or mount a CD, Linux auto-mounts it here.

/media/alice/USB_DRIVE/

/mnt — Temporary Mounts

A generic mount point for manually mounting filesystems — external drives, network shares, disk images.

mount /dev/sdb1 /mnt

/opt — Optional Software

Third-party software that isn't managed by the system package manager installs here (e.g. Google Chrome, JetBrains IDEs).


/proc — Process & Kernel Info

A virtual filesystem — nothing is actually stored on disk. The kernel exposes real-time system info as readable files.

cat /proc/cpuinfo   # CPU details
cat /proc/meminfo   # memory usage
cat /proc/uptime    # how long the system has been running

/root — Root User's Home

The home directory for the root (admin) user. Separate from /home so it's always accessible, even if /home fails to mount.


/tmp — Temporary Files

Programs store short-lived files here. Cleared on every reboot. Never store anything important here.


/usr — User Programs

The largest directory on most systems. Contains installed applications, libraries, and documentation for regular use.

/usr/bin/     # most user commands (python, git, vim…)
/usr/lib/     # libraries for those programs
/usr/local/   # software you compiled/installed manually
/usr/share/   # shared data and documentation

/var — Variable Data

Files that grow or change constantly — logs, caches, mail spools, databases.

/var/log/syslog       # system logs
/var/log/auth.log     # login and auth events
/var/cache/apt/       # package manager cache

Quick Reference

Directory Remember It As
/bin Commands for everyone
/boot Files to start the OS
/dev Hardware as files
/etc System config files
/home Your personal space
/lib Shared code libraries
/media Auto-mounted drives
/mnt Manual mounts
/opt Third-party software
/proc Live kernel/process info
/root Admin's home folder
/tmp Throwaway files
/usr Installed programs
/var Logs and growing data

Applies to most Linux distributions (Ubuntu, Debian, Fedora, Arch, etc.) following the Filesystem Hierarchy Standard (FHS).


root

Just share your knowledge!