LINUX
Structure
/bin
Short for “binaries”. Contains executable files of many basic shell commands (e.g. ls, cp, cd). This is generally accessible by everyone.
/sbin
Short for “System/Superuser binaries”. Same as above, but only can be run by the root user or by using sudo.
/boot
Short (or not) for “Bootl”. Contains the files of the kernel, the boot image, the bootloader (e.g. GRUB) as well as other files needed for booting.
/dev
Short for “devices”. Contains special files, including those relating to devices.
/dev/null: Is a black hole, anything sent here disappears/dev/zero: contains an infinite sequence of0/dev/random: contains an infinite sequence of random values
/etc
Short for “et cetera” (see Latin). Used to be a junk drawer but in modern days contains configuration files for the system.
/usr
Short for “user”. Contains all the executables, libraries, and source code for system programs.
/usr/bin
Short for “user binaries”. Much like /bin it contains executable for basic user commands.
/usr/sbin
Short for “System/superuser binaries”. Same as /usr/bin but with stuff for administrators
/usr/lib
Short for “user libraries”. Contains the libraries for the system.
/usr/local
Short for “User Local”. Contains executables here are “local” to this machine and so would persist between upgrades.
/usr/share
Short (or not) for “User share”. Contains docuemntation common to all libraries.
/home (a.k.a /~)
Contains personal directories for each user/ Each of those directories then contains all the user-specific data and configuration files. This is where personal files and software live.
/lib
Short for “libraries”. Holds all the libraries that are needed by the executable binaries that live in /bin and /sbin.
/tmp
Short for “Temporary”. Contains temporary files that many applications find it convenient to generate. All the files in here are deleted when the system restarts.
/var
Short for “Variable”. Contains files regarding system logging, user tracking, caches, and other system-related things that change a bunch.
/var/log
/var/lock
/var/tmp
/proc
Short for “Process”. Contains information about currently running processes and kernel parameters.
/opt
Short for “Optional”. Contains files for 3rd party software that are not available through the distribution’s repository.
/root
Short (or not) for “root”. Not to be confused with /, which is known as “the root directory”. /root is instead the home directory of the root user rather than what you might expect: /home/root.
/media
Short (or not) for “Media”. Contains directories for removable media that is connected to the system, for example a USB drive.
/srv
Short for “Service”. Contains files for services provided by the system. One example is if you run an http server, it might live in the /srv directory.