Friday, September 19, 2008

Linux File System 01 - sbin directory

/sbin

This directory contains all the binaries that are essential to the working of the system. These include system administration as well as maintenance and hardware configuration programs.

You can find lilo, fdisk, init, ifconfig etc here. These are the essential programs that are required by all the users.

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 only the system administrator has access to, but which are not required for system maintenance, repair etc



The /usr/sbin directory contains non-vital system utilities that are used after booting (i.e., starting the system) by the system administrator.

This is in contrast to the /sbin directory, whose contents include vital system utilities that are necessary before the /usr directory has been mounted (i.e., attached logically to the main filesystem).

A few of the more familiar programs in /usr/sbin are adduser, chroot, groupadd, kppp, kudzu, ping, setquota, traceroute, userdel and xcdroast.

/usr/sbin also contains some daemons, which are programs that run silently in the background, rather than under the direct control of a user, waiting until they are activated by a particular event or condition. Among the daemons in /usr/sbin are crond, pppd, sshd and xinetd.

/usr/sbin is a subdirectory of /usr, which is used to store many application programs. Another subdirectory of /usr, /usr/bin, contains programs that are not required for booting or repairing the system. The directory /usr/local/sbin is used for locally installed system administration programs.

Because /usr/sbin's programs are not intended for running by ordinary users, it is not in the path (i.e., the set of directories that system searches to find commands) for such users, as is also the case with /sbin. This can easily be seen by using the echo command (which displays whatever follows it or its value) while logged in as an ordinary user to see the value of the $PATH variable (which contains the user's path), i.e.,

echo $PATH

However, /usr/sbin is in the root user's (i.e., administrative account's) path, as can be seen by using the same command when logged in as the root user.

As is the case with any directory, the contents of /usr/sbin can be viewed by using the ls command, i.e.,

ls /usr/sbin

No comments:

Free Advertising