You already know that working with files on Linux is very important.
So let's check it out.
First thing to learn about is the file system hierarchy.
So the file system hierarchy standard is defining how directories on Linux are used.
And it's defined by the Linux Foundation and the so-called FHS.
Linux Foundation is the standardization committee behind Linux.
All the Linux distributors are a member of Linux Foundation.
And because they are the file system organization on all Linux distributions is the same, more
or less.
There's always a freedom for a distribution to introduce some new directories, but you
will see a high level of similarity no matter which distribution you are on.
Feel free to follow the link for more information.
The starting point of the file system is the root directory.
And different devices may be integrated in the file system by using mounts, which means
that the device is connected to a directory.
And even if it is largely implemented, distributions may add directories that are not a part of
the FHS.
Let's explore this file system hierarchy a little bit.
So there's a man page.
You can access it using man hire.
It's defined in section seven of man pages for miscellaneous information.
And you find a short description of all directories, even subdirectories included.
It's pretty complete.
So you'll probably get an answer to what is in this specific type of directory.
And if you want to see what's going on, go to the root directory, type ls, and there
you can see all these top level directories.
So do you really want to memorize what all these directories are about?
I don't think so.
There's a couple of important directories, like home, which is for user home directories,
which contains all personal files that the user is making.
USR is pretty important as well.
In the USR directory, you'll find subdirectories that refer to different types of files, like
bin and sbin, where bin is for files that are executable by ordinary users, and sbin
is for files that require super user privileges.
Another important directory is var, which is used by the operating system to create
files that are dynamically created, including var log, for instance, for your log files.
And there's etc for configuration files.
Configuration files are clear text readable files on Linux.
We'll find a couple of them.
Then there's slash boot, which contains the kernel and everything else that is required
for booting your system.
And last but not least, there's the dev directory, which is the device interface files, including
interface files like on my system, NVMe 0 and 1, which is my primary hard disk, or NVMe
0 and 1 P1, which is the first partition on that hard disk.
Don't bother remembering all these directories.
You will find your way eventually.
Most important is that you remember that USR is for the program files.
That's one of the most important ones around.