Posted: . At: 9:09 AM. This was 11 months ago. Post ID: 18143
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How the Linux directories such as /usr and /bin came to be.


The origin of the Linux directories such as /usr, /bin and /sbin are as follows.

  1. In 1969, Ken Thompson and Dennis Ritchie created Unix on a PDP-7. By 1971, they upgraded to a PDP-11 with RK05 disk packs for storage.
  2. The root filesystem, initially stored on the first RK05 disk pack, grew too big and leaked into the second disk pack, which housed user home directories. This is why the mount was called /usr.
  3. To accommodate the growing operating system, they replicated all the OS directories (/bin, /sbin, /lib, /tmp…) under /usr and wrote files to those directories.
  4. When a third disk became available, they mounted it on /home and relocated all the user directories there, allowing the OS to utilize space on both disks and grow to three megabytes.
  5. Rules were established regarding system boot-up to avoid a chicken-and-egg problem when mounting the second disk on /usr. These rules were specific to v6 Unix from 35 years ago.
  6. The /bin vs /usr/bin split, along with other similar splits, was an implementation detail from the 1970s that persisted due to bureaucratic reasons rather than practicality.
  7. The use of initrd and initramfs addressed the issues of file dependencies during system boot-up, making the split unnecessary.
  8. The introduction of shared libraries prevented independent upgrades of /lib and /usr/bin. Both partitions had to match for proper functionality, unlike in the past when everything was statically linked.
  9. The availability of cheap retail hard drives exceeding 100 megabytes, along with partition resizing software, made the partitioning scheme obsolete around 1990.
  10. Over time, additional rules were created to justify the split, such as differentiating between files from upstream (root) and site-local files (/usr). Distros like IBM AIX or Dec Ultrix were added to /usr, and /usr/local was introduced for specific installations. /opt was later added for new packages.
  11. Distro-specific rules and conventions emerged and changed over 30 years, such as the different treatment of /tmp and /usr/tmp between reboots. These variations predated tmpfs and were influenced by read-only root filesystems and the need for writable space in /var.
  12. Some attempts were made to move certain files from /etc to /var, but the practice of symlinking /etc to /var/etc is still common.

There is also the /usr/local directory as mentioned above, this is hardly used todya, but can be used to install software from source tarballs to keep it separate from the main software in /usr/bin.


Leave a Comment

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