Friday, January 24, 2025
HomeGeneralLinux File Hierarchy Structure

Linux File Hierarchy Structure

The Linux file hierarchy follows a standard directory structure known as the Filesystem Hierarchy Standard (FHS). Here’s an overview of the key directories and what they typically contain:

  1. / (Root Directory)
    • The top-level directory in the file system. All other directories and files are contained under this root directory.
  2. /bin (Binaries)
    • Contains essential command binaries (programs) needed for system booting and repairing. These are available for all users.
  3. /boot
    • Contains boot loader files, including the kernel, initrd (initial RAM disk), and other files needed to boot the system.
  4. /dev (Devices)
    • Contains device files that represent hardware devices (like /dev/sda for storage, /dev/tty for terminals).
  5. /etc (Configuration Files)
    • Contains system-wide configuration files for the operating system and installed applications (e.g., /etc/passwd, /etc/network/).
  6. /home
    • User-specific directories. Each user typically has a subdirectory here (e.g., /home/username) where personal files and configurations are stored.
  7. /lib (Libraries)
    • Contains shared libraries and kernel modules needed to boot the system and run programs in /bin and /sbin.
  8. /media
    • Mount point for removable media (CDs, DVDs, USB drives, etc.). Devices are typically mounted here when inserted.
  9. /mnt
    • A directory traditionally used for temporarily mounting file systems, like network shares or other disks.
  10. /opt (Optional Packages)
    • Contains optional software packages and third-party applications that are installed manually (not through the system’s package manager).
  11. /proc (Process Information)
    • Virtual filesystem that provides information about running processes, kernel parameters, and system statistics (e.g., /proc/cpuinfo for CPU info).
  12. /root (Root User’s Home)
    • The home directory for the root (administrator) user.
  13. /run
    • A temporary filesystem (usually mounted in RAM) that stores runtime data like currently running processes and other system states.
  14. /sbin (System Binaries)
    • Contains essential system binaries used for system maintenance and troubleshooting, typically by the root user.
  15. /srv (Service Data)
    • Contains data for services provided by the system, such as web server files or FTP server files (e.g., /srv/www for web content).
  16. /sys (System Information)
    • Another virtual filesystem that exposes kernel and device information (like /sys/class for device classes).
  17. /tmp (Temporary Files)
    • A directory for temporary files created by programs and users. Files here are usually deleted when the system reboots.
  18. /usr (User Data)
    • Contains read-only user data, including applications and files that are shared among users. The directory is usually large and contains subdirectories like /usr/bin (user binaries), /usr/lib (libraries), and /usr/share (shared data).
  19. /var (Variable Data)
    • Contains variable data files like logs, spool files, mail queues, and databases. It’s where dynamic content like system logs (/var/log) and mail files (/var/mail) are stored.
See also  Best Quality Nail Polish Brands and Lines

This structure is designed to keep things organized and make it easier to manage, especially for system administrators. Would you like more details about any specific directory?

RELATED ARTICLES

Spanning Tree

0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x