Filesystem Layout
The Linux Filesystem Hierarchy Standard
Unlike Windows, Linux has one unified directory tree rooted at
/ (pronounced "slash" or "root"). All disks, partitions,
and devices are mounted somewhere under this single tree.
$ ls / bin boot dev etc home lib lost+found mnt opt proc root sbin tmp usr var
Key Directories Explained
/ — Root
The top of the entire filesystem. Every file on the system is under / in some way.
/bin — Essential Binaries
Core command-line programs needed for the system to boot and run in single-user mode: ls, cp, mv, bash, etc.
/boot — Boot Files
Contains the Linux kernel (vmlinuz) and bootloader configuration files (GRUB/LILO).
/dev — Device Files
Special files representing hardware devices. Your first hard disk is /dev/sda, terminals are /dev/tty*.
/etc — Configuration Files
System-wide configuration files. This is where you'll spend a lot of time as an admin. /etc/fstab, /etc/passwd, /etc/hostname all live here.
/home — User Home Directories
Each user has a directory here: /home/alice, /home/bob. Your personal files, settings, and configs live here.
/lib — Shared Libraries
Essential shared libraries needed by binaries in /bin and /sbin.
/mnt — Mount Points
Temporary mount points for attaching extra filesystems (USB drives, network shares, CD-ROMs).
/proc — Process Filesystem
A virtual filesystem exposing kernel and process information in real time. cat /proc/cpuinfo shows your CPU details.
/root — Root's Home
The home directory for the superuser (root), kept separate from /home.
/sbin — System Binaries
Administrative commands used primarily by root: fdisk, ifconfig, reboot.
/tmp — Temporary Files
Temporary files that may be cleared on reboot. Don't store anything important here.
/usr — User Programs
The bulk of your installed software lives under /usr — /usr/bin, /usr/lib, /usr/share, and more.
/var — Variable Data
Files that change frequently: log files (/var/log), mail queues, printer spools, package databases.
Editing Files
To edit configuration files you'll need a text editor. Common choices are:
# nano /etc/hostname # vi /etc/fstab # emacs /etc/hosts
For beginners, nano is easiest — on-screen shortcuts are shown at the bottom of the window. Check out our Text Editors guide for more options.