Linux /sbin and its architecture!

Guide outline

1.1. Overview
1.2. The Root Directory
1.3. /bin
1.4. /boot
1.5. /dev
1.6. /etc
1.7. /home
1.8. /initrd
1.9. /lib
1.10. /lost+found
1.11. /media
1.12. /mnt
1.13. /opt
1.14. /proc
1.15. /root
1.16. /sbin
1.17. /usr
1.18. /var
1.19. /srv
1.20. /tm
2. Glossary

Additional Linux Resources

Here is a list of resources for learning Linux:

Resources for System Administrators

Linux System Admin Guide- What is Linux Operating System and how it works
Linux System Admin Guide- What are Directory Tree and Filesystem Hierarchy in Linux
Linux System Admin Guide- Introduction to Linux File Systems for System Admins
Linux System Admin Guide- Overview of Linux Virtual Memory and Disk Buffer Cache
Linux System Admin Guide- Best Practices for Monitoring Linux Systems
Linux System Admin Guide- Best Practices for Performing Linux Boots and Shutdowns
Linux System Admin Guide- Best Practices for Making and Managing Backup Operations

Resources for Linux Kernel Programmers

How Linux Operating System Memory Management works
Comprehensive Review of Linux Kernel Operating System Processes
Comprehensive Review of Linux File System Architecture and Management
What are mechanisms behind Linux Kernel task management
How Linux Kernel Sources and Functions work
Comprehensive look at how Linux Data Structures work

Hands-on Linux classes

Linux Operating System Distributions

Comprehensive list of all Linux OS distributions
Comprehensive list of all special purpose Linux distributions
Comprehensive list of all secure Linux distributions for cybersecurity professionals

1.16. /sbin

Linux discriminates between ‘normal’ executables and those used for system maintenance and/or administrative tasks. The latter reside either here or – the less important ones – in /usr/sbin. Locally installed system administration programs should be placed into /usr/local/sbin.

Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. This directory contains binaries that are essential to the working of the system. These include system administration as well as maintenance and hardware configuration programs. You may find lilo, fdisk, init, ifconfig, etc…. here.

Another directory that contains system binaries is /usr/sbin. This directory contains other binaries of use to the system administrator. This is where you will find the network daemons for your system along with other binaries that (generally) only the system administrator has access to, but which are not required for system maintenance and repair. Normally, these directories are never part of normal user’s $PATHs, only of roots (PATH is an environment variable that controls the sequence of locations that the system will attempt to look in for commands).

The FSSTND states that:


  /sbin should contain only binaries essential for booting, restoring,
  recovering, and/or repairing the system in addition to the binaries
  in /bin. 


A particular eccentricity of the Linux filesystem hierarchy is that originally /sbin binaries were kept in /etc.


  Deciding what things go into "sbin" directories is simple: if a normal
  (not a system administrator) user will ever run it directly, then it
  must be placed in one of the "bin" directories. Ordinary users should
  not have to place any of the sbin directories in their path.
  For example, files such as chfn which users only occasionally use must
  still be placed in /usr/bin. ping, although it is absolutely necessary
  for root (network recovery and diagnosis) is often used by users and
  must live in /bin for that reason.

  We recommend that users have read and execute permission for everything
  in /sbin except, perhaps, certain setuid and setgid programs. The
  division between /bin and /sbin was not created for security reasons or
  to prevent users from seeing the operating system, but to provide a
  good partition between binaries that everyone uses and ones that are
  primarily used for administration tasks. There is no inherent security
  advantage in making /sbin off-limits for users.


FSSTND compliance requires that the following commands, or symbolic links to commands, are required in /sbin.


       shutdown Command to bring the system down.


The following files, or symbolic links to files, must be in /sbin if the corresponding subsystem is installed:


       fastboot   Reboot the system without checking the disks (optional)
       fasthalt   Stop the system without checking the disks (optional)
       fdisk      Partition table manipulator (optional)
       fsck       File system check and repair utility (optional)
       fsck.*     File system check and repair utility for a specific filesystem (optional)
       getty      The getty program (optional)
       halt       Command to stop the system (optional)
       ifconfig   Configure a network interface (optional)
       init       Initial process (optional)
       mkfs       Command to build a filesystem (optional)
       mkfs.*     Command to build a specific filesystem (optional)
       mkswap     Command to set up a swap area (optional)
       reboot     Command to reboot the system (optional)
       route      IP routing table utility (optional)
       swapon     Enable paging and swapping (optional)
       swapoff    Disable paging and swapping (optional)
       update     Daemon to periodically flush filesystem buffers (optional)