Tuesday, July 21, 2020

Linux Series #4: Exploring the Directories



Hello everyone. While we were working on Windows we would have seen Volumes like C:, D: and so on depending on our wish. But whereas when you see Linux you will not find anything like, instead you can see several folders inside "/" root. Today we will see what all these inside the / root mean.

/bin  - Essential User Binaries


▶ All the User Binaries are present in this directory. Binaries here means compiled source code of the executable files.
▶ You can also find Important System Files/Utilities such as Bash Shell and files related to Linux Commands
▶ Ex. ps, ping, ls, grep

/boot -  Static Boot Files


▶ All the files needed to boot the system is present in this directory but you can't find the config files here.
▶ Ex. GRUB, Linux Kernel files, Static Files

/cdrom -  Historical Mount Point for CD-ROMs


 It is the temporary location for the CDROM inserted into the drive.

/dev - Device Files


▶ When you insert any device into a Linux system it considers them as a file. And these files are present in these folders. 
▶ It is also the home for all the Pseudo/Virtual Devices
▶ Ex. /sda - SATA, USB, Keyboard, etc.,

/etc - Configuration Files


▶ All the files needed for the configuration of the system are present here. Including files for the startup, shutdown, etc., These are editable files.

/home - Home Folders


▶ It is the home folder for each user. It holds all the data, saved and user config files.

/lib - Essential Shared Libraries


▶ Contains all the necessary libraries needed by the binaries.
▶ Contains Kernel modules and shared library required to boot the system and run commands.

/lost+found - Recovered Files


▶ If any files have been corrupted due to system crash or unexpected shutdown then those files are pushed out this directory from which we can recover. But nowadays in modern Linux systems, you can't find such a directory. It's a legacy feature.

/media - Removable Media


▶ This directory includes subdirectories removable media devices. 
▶ Also known as Temporary Mount Directory

/mnt - Temporary Mount Points


▶ To be short it is referred to as Mount Points for Temporary File System like Windows.

/opt - Optional Packages


▶ It includes the Sub-directories for optional software packages. These are used by the third-party or proprietary software that does not follow standard file system hierarchy. 

/proc - Kernel & Process Files


▶ This directory includes all the files of the system process information, running process, process ID.
▶ Considered as Pseudo Virtual System
▶ They are generated on the go.

/root - Root Home Directory


 This is the home directory of the "root" user.
▶ It is completely different from this root "/"

/run - Application State Files


▶ It provides a standard place for the applications to store transient files
▶ Also considered as a solution for an early-runtime-dir problem

/sbin - System Administration Binaries

 
▶ Has essential binaries that are needed to be run by the root user for system administration and maintenance purposes
▶ Ex: iptables, ifconfig, disk, swapon

/SELinux - SELinux Virtual File System


 Contains all the necessary files required by SELinux

/srv - Service Data


▶ Holds all the server-specific and server related files.
▶ Ex. Apache

/tmp - Temporary Files


▶ All the temporary files generated by the Applications are stored here and it gets deleted when the system gets restarted.
▶ Both the User and root has access to it.

/var - Variable Data Files


▶ It holds all the log, lock, spool, mail, packages and database files.


/usr - User Binaries & Read-Only Data



▶ It contains all the user binaries, documentation, libraries, header files, etc.,


Hope you got a high-level idea on these different directories.
If there's is any doubt or room for improvement please let us know.

Join the Telegram group for more stuff.
About Author

Hi everyone ! I am a Fresher in Cybersec. Gaming, Learning, Sharing with the community is my hobby. I help "students" who are looking to "start" their career in Cybersecurity with my opinions that I learn from my Journey.

You Might Also Like

0 comments:

Post a Comment

Search This Blog

Powered by Blogger.

Pages