Understanding the /bin, /sbin, /usr/bin and /usr/sbin Split

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, May 16, 2015

Follow me on Twitter as @mattiasgeniar

A short but illuminating read [pdf].

When their root filesystem grew too big to fit on their tiny (half a megabyte) system disk, they let it leak into the larger but slower RK05 disk pack, which is where all the user and home directories lived and why the mount was called /usr.

They replicated all the OS directories under the second disk (/bin, /sbin, /lib, /tmp…) and wrote files to those new directories because their original disk was out of space.

Understanding the bin, sbin, usr/bin, usr/sbin Split

That remaining artefact, of splitting /bin and /usr/bin, remains to this day.

Today, the files needed to boot a system are (mostly) statically linked and still live in /bin and /sbin. All other-purpose binaries reside in /usr/bin and /usr/sbin.

It’s interesting how something like the lack of disk space from over 30 years ago still influences directory structuring to this day.

Update 18/5/2015: as pointed out to me by @tvlooy on Twitter, the man-page on the filesystem hierarchy also reflects this.

$ man hier

(abbreviated version below)
HIER(7)                    Linux Programmer’s Manual                   HIER(7)

NAME
       hier - Description of the file system hierarchy

DESCRIPTION
       A typical Linux system has, among others, the following directories:

       /      This is the root directory.  This is where the whole tree starts.

       /bin   This directory contains executable programs which are needed in single user mode and to bring the system up or repair it.

       /sbin  Like /bin, this directory holds commands needed to boot the system, but which are usually not executed by normal users.

       /usr   This directory is usually mounted from a separate partition.  It should hold only sharable, read-only data, so that it can be mounted by various machines running  Linux.

       /usr/bin
              This is the primary directory for executable programs.  Most programs executed by normal users which are not needed for booting or for repairing the system and which are
              not installed locally should be placed in this directory.

       /usr/sbin
              This directory contains program binaries for system administration which are not essential for the boot process, for mounting /usr, or for system repair.

Good to know!



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.