Taking a look at the purpose of each individual Linux system folder
The Filesystem Hierarchy Standard (FHS)

Taking a look at the purpose of each individual Linux system folder

Welcome back to another tutorial from our Alpine Linux explorations tutorial series.

This time we are going to take a look at the purpose of each individual Linux system folder.

Linux systems have a specific directory structure that follows the Filesystem Hierarchy Standard (FHS).


Each directory serves a particular purpose and contains specific types of files:

/ (root): The root directory is the top-level directory of the filesystem hierarchy. All other directories are either directly or indirectly contained within it.

The root
The root

/bin: This directory contains essential binary files (executables) required for system boot and basic command-line operations. Common system utilities, such as ls, cp, and rm, are typically found here.

The bin directory
The bin directory

/boot: The /boot directory contains files related to the system boot process, including the kernel, bootloader configuration, and initial RAM disk (initrd) files.

The boot directory
The boot directory

/dev: The /dev directory contains device files, which represent hardware devices and interfaces on the system. These files allow access to various devices, such as hard drives, USB devices, terminals, and network interfaces.

The dev directory
The dev directory.

/etc: The /etc directory stores system configuration files. It contains various configuration files for the system, services, applications, and network settings. Examples include /etc/passwd for user account information and /etc/network/interfaces for network configuration. Also here we can find the /etc/apk/repositories configuration file for our APK package manager used by Alpine Linux.

The etc directory
The etc directory

/home: The /home directory is the location where user home directories are typically stored. Each user on the system has a subdirectory within /home that provides a private space for storing personal files and configurations.

The home directory
The home directory

/lib and /lib64: These directories store shared libraries required by the system and applications. /lib is used for 32-bit libraries, while /lib64 is used for 64-bit libraries on systems that support it.

The lib directory
The lib directory

/media: The /media directory is used as a mount point for removable media devices, such as USB drives and optical discs. When a device is inserted, it is typically automatically mounted under /media for easy access.

The media directory
The media directory

/mnt: The /mnt directory serves as a general-purpose mount point for temporary or manually mounted filesystems. It is often used by system administrators for mounting external filesystems or network shares.

The mnt directory
The mnt directory

/opt: The /opt directory is used for optional software packages and applications that are not part of the core system. Third-party software and self-contained application packages are typically installed here.

The opt directory
The opt directory

/proc: The /proc directory provides a virtual filesystem that contains information about running processes and system configuration. It exposes system and process details as files, allowing easy access for monitoring and debugging.

The proc directory
The proc directory

/sbin: Similar to /bin, the /sbin directory contains essential system binaries. However, these binaries are typically used for system administration tasks and require elevated privileges.

The sbin directory
The sbin directory

/srv: The /srv directory is intended for site-specific data or files served by the system. It is commonly used for storing data associated with network services, such as web server content, FTP files, or data shared across a network.

The srv directory
The srv directory

/tmp: The /tmp directory is a location for temporary files that are created and used by various programs and processes. Files in /tmp are generally expected to be deleted upon system reboot.

The tmp directory
The tmp directory

/usr: The /usr directory contains user-accessible system files and programs. It includes subdirectories such as /usr/bin for user binaries, /usr/lib for libraries, /usr/share for shared data, and /usr/local for locally-installed software.

The usr directory
The usr directory

/var: The /var directory holds variable data that changes during system operation. It includes log files (/var/log), spool directories (/var/spool), package caches (/var/cache), and other dynamic data.

The var directory
The var directory

The directory structure may vary slightly between different distributions.

Now we can use the 'poweroff' command to shut down our Alpine Linux system.

We can now shut down our Alpine Linux system using the 'poweroff' command
We can now shut down our Alpine Linux system using the 'poweroff' command

Well, that was most enjoyable. See you in the next tutorial! #linux

To view or add a comment, sign in

More articles by Razvan Alexandru Ionica

  • Updating Rocky Linux 9.4 packages

    Rocky Linux was founded by Gregory Kurtzer, one of the original founders of CentOS, in December 2020. The project was…

  • Installing GUI on Oracle Solaris 11 (sol-11_4-text-x86.iso)

    Sun Solaris, now known as Oracle Solaris, is a Unix operating system originally developed by Sun Microsystems. Oracle…

    9 Comments
  • Updating Rocky Linux 9.4 Kernel

    Rocky Linux is a free and open-source enterprise operating system designed to be fully compatible with Red Hat…

    8 Comments
  • Updating Rocky Linux 9.4 Multimedia Codecs

    Rocky Linux is an open-source enterprise operating system designed to be a downstream, community-supported…

  • Setting up OpenSolaris 2009.06 (osol-0906-x86.iso) for a virtual machine

    UNIX is a powerful, multiuser, multitasking operating system originally developed in the 1960s and 1970s at AT&T's Bell…

    13 Comments
  • OpenSolaris 2009.06

    OpenSolaris was an open-source operating system based on the Solaris kernel and associated tools. It was initiated by…

    32 Comments
  • Force RHEL 7 to set the date 2 years in the past

    Here is a question from one of our fellow UNIX Europe group members: How can he force RHEL 7 to set the date 2 years in…

    12 Comments
  • Setting up RHEL 7 (rhel-server-7.9-x86_64-dvd) for a virtual machine

    RHEL 7, or Red Hat Enterprise Linux 7, was a major release of the RHEL operating system that was introduced in June…

    8 Comments
  • Update Rocky Linux from 9.3 to 9.4

    Rocky Linux is an exciting development in the world of Linux distributions. It was created as a direct response to the…

    2 Comments
  • Install LibreOffice on Rocky Linux 9.3

    Rocky Linux was created as a community-driven, enterprise-focused Linux distribution. It aims to be a downstream…

Insights from the community

Others also viewed

Explore topics