Linux Directory Structure Details
Linux Directory Structure :-
FHS, or File Hierarchy System, is what defines the file system structure on Linux but there are also a few directories that have not yet got a definition under this standard:-
/ – The Root Directory :-
On Linux, everything is found under the directory / which is also called the
root directory. like C:/ on Windows operating system but without any drive letters.
/bin – Essential User Binaries:-
This directory is home to the binaries or programs that are essentials to the system being mounted in single-user mode. Things like Google Chrome would be stored in the directory called /usr/bin, while the utilities and system programs, like a bash shell, are found in /bin.
/boot – Static Boot Files:-
In this, where the files needed to boot up our system are located, such as the kernel files and the GRUB boot loader. The configuration files, however, are in/etc.
/
In this directory doesn’t come under the FHS standard but is still to be found in most operating systems. It is a temporary location for when you insert a CD-ROM into your computer.
/dev – Device Files :-
Devices are exposed as files on Linux and in this directory has several special files that are representative of devices. These are not files in the way we know them but they look like they are.
For example, if you see /dev/
/etc – Configuration Files:-
Here the configuration files are found and these can be edited in
/home – Home Folders :-
In
/lib – Essential Shared
It contain all the libraries that the binaries located in the /bin and /
/lost+found – Recovered Files :-
Every file system has a lost and found directory; if our system were to crashed, at the next bootup, a file system check is performed. If corrupted files are found, they are put into the directory, giving you the chance to recover as much as
/media – Removable Media:-
Here we can find subdirectories and this is where removable media that is connected to the system is mounted. For example, a DVD or USB. When each is mounted, a new drive will appear, allowing you to access the media content.
/mnt – Temporary Mount Points :-
Here administrators mount temp file systems while we are using them.
/opt – Optional Packages :-
Here we can find subdirectories for software packages that are optional. It is generally used by software that doesn’t follow the rules of the standard FSH.
/proc – Kernel & Process Files :-
It is like the /dev directory as it
it has special files that are representative of process and system
/root – Root Home Directory :-
This is the root user’s home directory. Note it is not located in /home/root,
only at /root, distinguishing itself from /, which is the root directory for the
system.
/run – Application State Files :-
It is quite new and
/
Similar to /bin and contains binaries it is used for system administration by
the root user.
/
It is our particular Linux distro used SELinux as security.
/
Hera will find the “data for services provided by the system”. If,
for example, we are using the Apache HTTP server for our website, the
files for the website would be stored in this directory.
/
Here temporary application files are stored and are deleted when the
system is rebooted.
/
We find files and applications here that are used by users and not by
/var – Variable Data Files :-
Where /
anything else that is normally written to /