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/
Binaries
(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/
Devices
(hardware, 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 settings.
)
/lib/, /lib32/, /lib64/
Libraries
(files that binaries need to run certain applic­ation settings)
/media/
Flash Drives
(removable drives and devices; Linux automa­tically installs these)
/mnt/
Mounted Drives
(permanent storage)
/opt/
Optional
(manually installed software from vendors and some reposi­tories)
/proc/
System Processes and Resources
(processes 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 procedure)
/snap/
Snap Packages
(mainly used by Ubuntu; completely self-c­ont­ained packages)
/srv/
Services
(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­ations
(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/l­oca­l/bin
,
usr/lo­cal­/sbin
and their libraries in
/usr/lib
,
/usr/l­oca­l/lib
; Most programs installed from source code are in the
local
folders and larger programs in
/usr/share
)
/var/
Variable
(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