Unlike in Windows, Linux-based operating systems access everything starting with “/
” , the “root” directory. From there, everything else exists.
For those reading at home, this what’s called the the Filesystem Hierarchy Standard (FHS), used across most Linux operating systems.
“In Linux, EVERYTHING is a file” - Some guy I don’t know
Depending on the operating system, certain top-level folders may be missing or others in their place, but IN-GENERAL, these are what some are for:
/
(Root Directory): The root directory contains all other directories and files./bin
: Contains binaries (executable files) that are installed versus . Home to binaries to commands that you’re become familiar with:cat
,sh
,bash
,ls
,ping
, and more./etc
: Configuration files for system-wide applications, various subdirectories for different services and programs, and for configuring parts of Linux in-general./lib
and/lib64
: Typically points (With symbolic “links” or “shortcuts”) to/usr/lib
. A system-wide shortcut to library files for all programs to use./dev
: Device files that represent physical and virtual devices in the system are here, software points to “files” here to access physical or virtual things. Ex:/dev/sda
for the first hard-drive,/dev/null
for the trash can./proc
: Contains files which represent active processes and kernel components. Any numbered folder corresponds with a process with the same id, for example/proc/1/
is typicallysystemd
, which starts your operating system./var
: Variable data files for running applications are stored here, including log files, spool directories, temporary files, and data that frequently changes during system operation./tmp
: Temporary files for the system. These files are usually deleted on system reboot./usr
: User-level utilities and applications. Divided into subdirectories like/usr/bin
for user-installed binaries,/usr/lib
for user-installed libraries,/usr/share
for shared user data, and more./home
: User home directories are located here. Depending on the configuration, certain user accounts may get a subdirectory within/home
to store their personal files and settings./boot
: Stores the Boot loader and kernel files. It is essential for system booting./opt
: Additional software packages that are not part of the base distribution can be installed in this directory. Third-party software usually is installed here./media
and/mnt
: These directories are used for mounting removable media (CDs, USB drives, Network Shares).