Unix-like systems such as Linux expose a single directory tree that starts at the root directory, written as
/. Everything else is placed somewhere under that root: programs, configuration, user files, devices, and even some kernel-provided views of the running system.Here are the directories you’ll see on most Linux systems:
-
/: The root of the whole filesystem tree. -
/bin: Essential command-line programs needed for basic use and recovery (things likesh,ls,cp). -
/boot: Files used for booting, like the kernel image and bootloader configuration (common on many Linux installs). -
/dev: Device files: entries the kernel provides so programs can talk to hardware and pseudo-devices using file-like operations. -
/etc: System-wide configuration files. These are usually plain text files that control how services and programs behave on this specific machine. -
/home: Users’ personal directories. Each user typically gets/home/<name>for their files and per-user configuration. -
/lib(and/lib64on some systems): Shared libraries needed by essential programs. A library is reusable code that programs load and use at runtime. -
/media: Often used for removable media (USB drives, external disks) that the system mounts automatically. -
/mnt: A traditional place to temporarily mount (attach) another filesystem, like a separate disk, for manual use. -
/opt: Optional "third-party" or vendor software that doesn’t want to follow the normal/usrlayout. You’ll often see large self-contained packages installed here. -
/proc: A virtual filesystem that exposes information about running processes and some kernel state. The files here are generated by the kernel; they’re not stored on disk. -
/root: The home directory of theroot(administrator) user. It’s separate from/homeon purpose. -
/sbin: Essential system administration programs (tools mainly meant for the administrator, like networking or disk utilities). Same note as/bin: sometimes it’s a link to/usr/sbin. -
/srv: Data that this machine serves to other computers (for example website files). Not all systems use it, but when they do, it’s meant to keep served content in one predictable place. -
/tmp: Temporary files. Programs may put short-lived scratch files here. It’s common for/tmpto be cleaned on reboot. -
/usr: Most "normal" installed programs and read-only data used by them. Think of it as the bulk of the operating system’s user-space software. -
/usr/bin,/usr/sbin: The main locations for installed commands (regular user commands in/usr/bin, admin-oriented commands in/usr/sbin). -
/usr/lib: Libraries for the programs installed under/usr. -
/var: "Variable" data: things that change while the system runs, like logs, caches, databases, and queues. -
/var/log: Log files: records of what services and the system have been doing. -
/run: Runtime state created since boot: small files that represent running services, process IDs, and other "this boot session" data. (Historically some of this lived in/var/run.) -
/sys: Another virtual filesystem that exposes hardware and driver information in a structured way. Also generated by the kernel.
That's the end of the course. If you followed it all the way through, well done: this is not the kind of material you "accidentally" finish.
The goal was never to turn these topics into a pile of facts to memorize, but to give you a clearer map of what belongs where, and what each layer is responsible for.
What matters is that you now have a better "sense of place". When something feels confusing, don’t treat it as a personal failure: treat it as "I don’t yet know which layer this belongs to". Go back, place it on the map, and it usually becomes much easier to reason about.
Good luck!