Show Menu
Cheatography

The Linux File Hierarchy Standard (FHS). This describes what the folders are for on your root directory and what is typically stored there. Everything item in Linux is treated like a file.

Ubuntu

/bin/
Bina­ries
(basic shell commands, like ls, cat, grep, etc.)
/sbin/
System Binaries
(binaries that a system admin would use. A standard user typically needs permis­sions to access these. Both bin and sbin are needed to be accessed in single mode, a special mode that boots you as root user to do repairs and upgrades
/boot/
Boot Loaders
/dev/
Devi­ces
(hard­ware, including webcams and keyboards; hard drive "­a" would be /dev/sda and the first partition on that hard drive would be /dev/­sda1)
/etc/
Et Cetera
(where all system­-wide config­ura­tions are stored*)
/home/
Home
(all your personal files, documents, and downloads; user settings are also stored here in hidden files (those beginning with a "."), namely the .bashrc or .local for individual applic­ation or desktop settin­gs.)
/lib/, /lib32/, /lib64/
Libr­aries
(files that binaries need to run certain applic­ation settings)
/media/
Flash Drives
(remo­vable drives and devices; Linux automa­tically installs these)
/mnt/
Mounted Drives
(perm­anent storage)
/opt/
Opti­onal
(manually installed software from vendors and some reposi­tor­ies)
/proc/
System Processes and Resour­ces
(proc­esses being run in your system­/task manager)
/root/
Root User's Home Folder
/run/
Run
(tempfs file system; everything in it runs in RAM, so files are created as startup and deleted at shutdown; Used for processes that start early in the boot proced­ure)
/snap/
Snap Packages
(mainly used by Ubuntu; completely self-c­ont­ained packages)
/srv/
Serv­ices
(where service data is stored; typically a place to store files you want a server to access if you run a server)
/sys/
System
(a way to interact with the Linux kernel; everything in here runs in RAM, so files are created at startup and deleted at shutdown)
/usr/
User Applic­ati­ons
(where user applic­ations are stored; applic­ations installed here considered non-es­sential for basic system operation; Installed applic­ations are stored in /usr/­bin, /usr/­sbin, /usr/­loc­al/­bin, usr/l­oca­l/sbin and their libraries in /usr/­lib, /usr/­loc­al/­lib; Most programs installed from source code are in the local folders and larger programs in /usr/­sha­re)
/var/
Vari­able
(used to store files that grow in size, like /var/­crash for crashes, /var/­log/ for program logs, and things like databases for mail and the printer spool, etc.)
       
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Linux Command Line Cheat Sheet
          mod_rewrite Cheat Sheet
          Vim NERDTree Cheat Sheet