FHS made simple in less than 2 minutes
What a mess!
That was my reaction when I saw the FHS file structure for the first time. Analogously to the Plato cave allegory, those directories were ugly shadows that came from outside and were projected at the cave's wall. Sometimes those shadows blocked me from coming outside "my Plato's cave", so let's put some light on this matter.
First of all, but non less important remember: FHS is a convention but...
There are a special place in hell for those ones that ignore conventions. (SysAdmin Shakespeare)
/bin/
Here all system main binaries or executables will reside. Learning to use those binaries first will ensure that in case of a harmful system crash when only those binaries are loaded you must use them to recover your system. For example, if you like to use vi or vim to edit text, in some cases you'll have only nano or sed to do it.
/sbin/
Here only system binaries that require root to be used will reside. Those binaries do things like loading kernel modules, managing disk partitions, and even managing system daemons;
/lib/ and /lib64/
Here shared libraries for binaries at /bin/ and /sbin/ will be placed.
/usr/
Here you have subdirectories /usr/bin and /usr/lib that respectively keep non-essential installed binaries and their shared libraries. Those binaries are non-essential for the operating system itself but are essential to the user.
Also at /usr/ we have /local/bin/ that contains software compiled on the fly for current computer architecture. This directory is important to put those files and avoid conflicts with the same software that came from the package's manager.
The $PATH environment variable
All those binary paths are listed in your $PATH environment variable as you can see by typing:
cat $PATH
It's because $PATH variable that you can call a binary from any place at the CLI interface.
/etc/
This directory is not etcetera but an acronym for Editable Text Config. Here all settings for those binaries will be placed. Do you want to configure some software? This is the place!
/home/
There is no place like home! Here each system's user will have a subfolder and all your stuff will live here.
/boot/
Here all files for boot your machine will be placed.
/dev/
Here any device on your machine is mapped to a file. We know that different hardware is manufactured in different ways and needs to interact with the operating system. The hardware manufacturer writes a piece of software also called a driver, that maps the way that hardware works for the current operating system. So the operating system will create a way to access those drivers in files written at /dev/
/opt/
Contains optional or add-on software and you will rarely interact with that
/var/
Contains the variable files that will be changed when the operating system is used. Such as logs, database data, etc;
/tmp/
It is for temporary files. Created in major by software processing and usage, this directory will be flushed its contents on each reboot;
/proc/
Here the kernel creates an illusionary file system on the fly to keep track of running processes;