🧏🏻‍♀️“Decoding Linux File System Basics: A Beginner’s Roadmap.”
🧑🏻‍💻Linux File System Hierarchy
In Linux, the files are stored in a directory, and every directory contains a file with a tree structure. That is called File System Hierarchy.
Linux uses a single-rooted, inverted tree-like structure.
Root Directory represents with / (forward slash) It is a top-level directory in Linux.
🤌 /root
“root” is a home Directory and signifies the superuser.
Only the administrator can use this…
🤌 /bin→ User Binaries
Contains binary executable.
Commands which are used by any user are stored here…
command: - ubuntu@ip-174–31–35–239:/$ cd bin
🤌 /sbin→ System Binaries
contain binary executables and Commands under this will be used for Administrator purposes.
For example: - /sbin/reboot, /sbin/ifconfig, /sbin/dhclient, /sbin/sysctl…
command: - ubuntu@ip-174–31–35–239:/$cd sbin
🤌 /dev→ Device Files
It includes files related to devices like terminals, USB devices, and other hardware connected to the system.
For example: /dev/ttyl, /dev/usbmono
command: - ubuntu@ip-174–31–35–239:/$cd dev
🤌 /var→ Variable Files
“/var” directory is used to store variable data.
It includes logs, spool files, caches, temporary files, and other variable data generated during the operation of the system or applications.
var/log: System log files generated by OS and other applications.
/var/lib: Contains database and package files.
/var/mail: Contains Emails.
/var/tmp: Contains Temporary files needed for reboot.
🤌 /mnt> Mount Directory
This directory is used to mount a file system temporarily.
command:- ubuntu@ip-174–31–35–239:/$cd mnt
🤌 /media→ Removable Media Devices
The “/media” directory is often used as a mount point for removable media devices such as USB drives, CD-ROMs, or external hard drives.
🤌 /usr Unix system resources
“/usr” is where a bunch of stuff like programs, libraries, and shared data live. It’s like a big storage place for things that many users on the system can use.
🤌 /etc → Configuration files
It contains all configuration files of the server.
The core configuration files are stored in the /etc directory. It also contains scripts for starting or stopping programs during system events. It’s like the control room for setting up and managing how things work.
🤌 /boot → Boot Loader files
The /boot directory contains the files needed to boot the system.
for example: - the GRUB boot loader’s files and your Linux kernels are stored here.
🤌 /opt→ Optional Applications
The opt directory is used for installing the application software from third-party vendors that are not available in the Linux distribution. Usually, the software code is stored in the opt directory and the binary code is linked to the bin directory so that all users can run that software.
🤌 /home → Home Directory
It contains the secondary user’s home directory.
🤌 /tmp → Temporary Files
Files under this directory are temporary files that are deleted when the system is rebooted.
🧑🏻‍💻Conclusion: - Looking ahead, our upcoming blog will delve into the practical side with “Mastering Basic Commands in Linux.” Here, we’ll explore fundamental commands that empower users to interact with the system efficiently.