Skip to content
Linuxinfra.com
Menu
  • Home
  • Linux Security
  • Linux Administration
    • Linux History
    • Why Linux is Better?
    • What Are Linux Distributions?
    • Linux kernel and shell
    • Processes in Linux/Unix
    • Linux Basic Commands
  • Cyber Security
    • PCI DSS
      • Module 1: Introduction to PCI DSS
      • Module 2: PCI DSS Requirements Overview
      • Module 3: Scope of PCI DSS Compliance
      • Module 4: Risk Management and Vulnerability Assessments
      • Module 5: Implementing and Maintaining PCI DSS
      • Module 6: Compliance Validation and Reporting
      • Module 7: Best Practices and Case Studies for PCI DSS
      • Module 8: Updates and Future of PCI DSS
Menu

Linux Directory Structure

Posted on December 31, 2023

The Linux directory structure provides a hierarchical organization for storing and managing files and directories. Here’s an overview of the key directories in the Linux file system:

  1. / (Root):
    • The root directory is the top-level directory in the file system hierarchy. It contains all other directories and files.
  2. /bin (Binary):
    • Essential command binaries (executable files) needed for system booting and repair. Common commands like ls, cp and mv are stored here.
  3. /boot:
    • Contains files necessary for the system boot process, including the Linux kernel and initial RAM disk (initramfs).
  4. /dev (Device):
    • Device files representing hardware devices on the system, such as hard drives, partitions, and external devices.
  5. /etc (Etcetera):
    • Configuration files and directories containing system-wide configuration files and scripts.
  6. /home:
    • Home directories for individual users. Each user has a subdirectory within /home.
  7. /lib (Library):
    • Essential shared libraries needed by system binaries located in /bin and /sbin.
  8. /lib64:
    • On 64-bit systems, this directory contains 64-bit shared libraries.
  9. /media:
    • Mount points for removable media devices such as USB drives, CD-ROMs, and external hard drives.
  10. /mnt (Mount):
    • Temporary mount points for mounting file systems during system maintenance.
  11. /opt (Optional):
    • Optional software packages are installed in subdirectories under /opt.
  12. /proc (Process):
    • A virtual file system providing information about running processes and kernel parameters.
  13. /root:
    • The home directory for the root user.
  14. /run:
    • System runtime data, including information about running processes, is stored here.
  15. /sbin (System Binary):
    • System binaries essential for system booting, restoring, and repairing are stored here.
  16. /srv (Service):
    • Data for services provided by the system.
  17. /sys:
    • A virtual file system that exposes information about the kernel and devices.
  18. /tmp (Temporary):
    • Temporary files are stored here. This directory is usually cleared on system reboot.
  19. /usr (Unix System Resources):
    • Secondary hierarchy containing user utilities, applications, libraries, and documentation.
  20. /var (Variable):
    • Variable files, such as logs, databases, and spool files, are stored here. Data that may change during normal system operation is placed in this directory.

These directories follow the File System Hierarchy Standard (FHS), which is a set of guidelines for the directory structure and organization on Unix-like operating systems, including Linux. Understanding the purpose of each directory is essential for efficiently navigating and managing a Linux system.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

cloud infrastructure community support customizability data protection developer tools free software hardware support lightweight Linux Linux applications Linux command line Linux Community Linux community support Linux development Linux Distributions Linux for old hardware Linux for servers Linux graphical interface Linux installation Linux Kernel Linux package manager Linux performance Linux rolling release linux security Linux security tools Linux server Linux software Linux support Linux terminal Linux updates multitasking multiuser networking no bloatware open-source performance privacy privacy control programming scalability secure OS security software repository stability system resources

  • January 2025
  • November 2024
  • September 2024
  • August 2024
  • March 2024
  • January 2024
  • December 2023
©2025 Linuxinfra.com | Design: Newspaperly WordPress Theme