Skip to content

Did you know?

On most Linux distributions, /bin is just a link to /usr/bin.

The same goes for /sbin and /lib: everything lives under /usr now.

Explained

The classic Linux layout kept the minimum needed to boot in /bin, /sbin and /lib, and everything else in /usr, which could sit on a separate disk mounted later. Modern systems mount /usr early from the initramfs, so that split no longer serves a purpose.

Fedora, RHEL, Arch Linux, openSUSE, Debian 12 and later, and current Ubuntu releases therefore use a merged /usr: the top-level directories are symbolic links into /usr.

ls -ld /bin /sbin /lib
lrwxrwxrwx 1 root root 7 Apr  2 10:15 /bin -> usr/bin
lrwxrwxrwx 1 root root 7 Apr  2 10:15 /lib -> usr/lib
lrwxrwxrwx 1 root root 8 Apr  2 10:15 /sbin -> usr/sbin

Because of the links, /bin/bash and /usr/bin/bash are the same file, so old scripts and shebang lines keep working. When you install your own programs, put them in /usr/local/bin, not in /bin or /usr/bin, which belong to the package manager.

Learn more

← All tech tips · Suggest a fix

Back to top