Why we have /bin/ and /usr/bin/

| 2 min read

There's a simple, historic reason why we have /bin/ and /usr/bin/

I'd half wondered for a while why many of the directories in the root filesystem (/) of a Linux installation are also to be found in /usr. Recent convention implies that 'usr' stands for "User System Resources" but this is really only a sort of backronym.

There are executable files and libraries in /bin/ and /lib/, for example, but also in /usr/bin/ and /usr/lib/. Why? Regardless of what people might tell you today, the answer lies in the history of Unix (upon which Linux is based, of course). Created in the late 1960s / early 1970s on Digital PDP machines with limited disk space, the original Unix operating system binaries were placed on the root filesystem (mounted at /), with e.g. executables, libraries and configuration files split across /bin/, /lib/ and /etc/ directories respectively.

Separate from the root filesystem was another filesystem (on a separate disk) for users' home directories. This was /usr/ - yes, short for "user(s)".

As the Unix system grew, the space on the root filesystem disk eventually ran out, and a decision was made to move some of the executable and library content over to the other disk that was mounted on /usr/. It made sense to replicate the names of the directories on that other disk, names which therefore became /usr/bin/ and /usr/lib/ because of the relation to where that filesystem was mounted.

Over time the place for the users' home directories moved from /usr/ to /home/, meaning /usr/ content eventually lost any semblance of user-specific focus.

A bonus, related thing I learned fairly recently is that the "s" in sbin (which also can be found in both the filesystems mounted on root (/) and /usr/) stands for "system" denoting that the content is only executable by the root user.