old-www/LDP/Linux-Filesystem-Hierarchy/html/sbin.html

293 lines
6.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>/sbin</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux Filesystem Hierarchy"
HREF="index.html"><LINK
REL="UP"
TITLE="Linux Filesystem Hierarchy"
HREF="c23.html"><LINK
REL="PREVIOUS"
TITLE="/root"
HREF="root.html"><LINK
REL="NEXT"
TITLE="/usr"
HREF="usr.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Filesystem Hierarchy: </TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="root.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 1. Linux Filesystem Hierarchy</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="usr.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="sbin"
></A
>1.16. /sbin</H1
><P
>&#13; 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.
</P
><P
>&#13; 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.
</P
><P
>&#13; 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).
</P
><P
>&#13; The FSSTND states that:
</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>
/sbin should contain only binaries essential for booting, restoring,
recovering, and/or repairing the system in addition to the binaries
in /bin.
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13; A particular eccentricity of the Linux filesystem hierarchy
is that originally /sbin binaries were kept in /etc.
</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; 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.
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13; FSSTND compliance requires that the following commands, or symbolic links to commands,
are required in /sbin.
</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; shutdown Command to bring the system down.
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13; The following files, or symbolic links to files, must be in /sbin
if the corresponding subsystem is installed:
</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; 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)
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="root.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="usr.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>/root</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c23.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>/usr</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>