Linux Sbin System Directory – Ls (List) Directory Command Examples – Quick Tips For Linux Commands


Viewing the Linux / (Root) and / sbin and System Directories "Off Of" The / (Root) Directory

Now see the some of the Linux System directories that are "off of" the / (root) directory, including the sbin (supervisor binaries) directory.

Examples of Running the Linux ls Command to View System Directories Beginning with "s"

At the Linux command line, you can use a; (semicolon) between commands (with a space on either side of the;)) to run multiple commands at one time.

Use the two commands on one line below to: clear the screen and change into the root directory.

    $ clear; cd /

Now use the ls command with the – l for " l ong" and – d for " d irectories only" options to see the directories beginning with " s " (only) that are "below" the / (root) directory – because the file pattern of " s *" is being used.

    $ ls -ld s *

Notice the sbin directory, which is below the / (root) directory.

Viewing the Linux "Superuser" Binary Program Files in the / sbin Directory Path

Now change into the sbin directory (that is "off of" the / directory) and use the less command to look at its contents.

    $ cd / sbin; ls -l | less

Scroll down and up with the up and down arrow keys and press page up and page down.

The Linux superuser is also referred to with "su" and is also called root.

The sbin ( s uperuser bin ) directory contains binary files (commands) that are typically only used by the root user. These are some of the most important Linux System Administration commands.

For example, / sbin contains the following "command binaries": fdisk (partition a hard disk), halt (shut the system down), ifconfig (view and configure network settings), init (change the mode in which Linux is working) and runlevel (view the current mode).

The sbin directory below the path of / usr (in the full path of / usr / sbin) also contains Linux system administration commands.

Press q to quit to quit out of the less command interface.

The Linux sbin system directory and the command concepts covered here apply to ALL Linux distributions and versions, including Ubuntu, openSUSE, Red Hat, Debian, SUSE, Fedora and Slackware Linux.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.