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

要查看或添加评论,请登录

社区洞察

其他会员也浏览了