Linux Directory Structure (cheatsheet)


When you look at the root of the Linux filesystem, it may feel weird: folders with strange names. In fact, it’s pretty logical once you know the abbreviations and acronyms:

/bin     USER PROGRAMS (binaries for users)  
/sbin    SYSTEM PROGRAMS (binaries for root/admin)  
/etc     CONFIGURATION FILES (configs and settings)  
/dev     DEVICE FILES (device access files)  
/proc    PROCESS INFORMATION (proc & kernel data)  
/var     CHANGING DATA (logs, caches, queues, dbs)  
/tmp     TEMPORARY FILES (temp stuff, wiped on reboot)  
/usr     UNIX SYSTEM RESOURCES (apps, libs, docs)  
/home    HOME DIRECTORIES (user homes, personal files)  
/boot    BOOT FILES (kernel and bootloader)  
/lib     SYSTEM LIBRARIES (libs and kernel modules)  
/opt     ADDITIONAL APPS (third-party software)  
/mnt     TEMPORARY MOUNT (manual mount points)  
/media   REMOVABLE MEDIA (auto-mount usb/cd)  
/srv     SERVICE DATA (web, ftp, db service data)  

/root    ROOT USER HOME (root's home dir)  
/sys     KERNEL INTERFACE (kernel & hardware info)  
/run     RUNTIME DATA (runtime files, /var/run repl.)  
/lost+found RECOVERED FILES (fsck-recovered files)  

This is the basic Linux skeleton. In almost every distribution, it looks the same.

The base of this cheatsheet has been circulating online, but it often had mistakes and lacked proper functional explanations. For example, it’s important to know that /usr does not contain your personal files (that’s what /home is for), but rather system resources: programs, libraries, and documentation available to all users. I also added root, sys, and run. Anyway, sharing it here 🙂


This entry was posted in Linux (en), OS. Bookmark the permalink.

Leave a Reply

🇬🇧 Attention! Comments with URLs/email are not allowed.
🇷🇺 Комментарии со ссылками/email удаляются автоматически.