Profile picture
foone @Foone
, 18 tweets, 4 min read Read on Twitter
Since I posted that thread about CP/M decisions from 1974 influencing Windows 10, a few people said "This is why I use Linux!"

Well, here's the problem: Linux is Unix, and Unix is older than even CP/M. There are design decisions from farther back affecting it today!
Like let's look in the root directory. There's a bunch of folders, and most of these are relatively recent additions.
But the "classic" ones are like /etc, /bin, /lib, /sbin, right?
But wait: Let's check in /usr.
And hey, /usr has a "bin", a "sbin", and a "lib".
Why are there two bins (/bin and /usr/bin), two sbins, and two libs?
So the traditional answer you get for which files go where is that /usr files are "less important" and contain stuff needed for normal functioning, but /bin, /sbin, and /lib contain files that are needed even when doing emergency maintenance.
So like, bash is in /bin and fdisk is in /sbin, but things like firefox are in /usr/bin, cause if your system is broken and you need to repair it, you definitely need bash and might need fdisk, but you're unlikely to need to go to Twitter.
But that's a retro-explanation applied later. That's not WHY there's a /usr.

To answer why we have a /usr, we have to go back to 1971, and the RK05.
See, Unix was originally developed on a PDP-7 minicomputer, starting in 1969 at Bell Labs.
They used this computer for two years.
Then in 1971 they got funding to upgrade to a PDP-11, and ported Unix to run on that. This machine was a 16-bit powerhouse with up to 56 kilobytes of ram, and cost 20,000$ in 1970. That's about 133k$ today!
And most importantly for how Linux works today: it had a lot more storage.
Bell Labs bought the PDP-11/20 with a RK11 controller (supporting up to EIGHT hard drives), and initially fitted it with two RK05 hard drives.
Each of these drives had a MASSIVE 2.5 megabytes of storage!
So originally Unix was running on the PDP-7 with one hard drive. One big partition, containing all the files.

It had directories /bin and /usr at least, and /usr was USER DIRECTORIES!
not /home (which is user directories now, if you're not a unix-er). /home came later. Originally it was /usr.

And when they upgraded to two drives on the PDP-11, they thought: hey, let's split this up logically: disk 1 is root, disk 2 is users!
so disk 1 contained /bin and other files, and disk 2 was /usr. All the users now had NEARLY INFINITE SPACE and everything was great.

Until they ran out of space on disk 1.
The OS was under active development, and all sorts of tools were being added. And they were running out of space, quickly.
RK05 hard drives were expensive, so just adding a third drive would be a pain... and /usr wasn't very full...
So they duplicated the layout of / onto disk 2: /usr/bin & /usr/lib were created. Some utilities and libraries were moved there. Which ones? Which ones would fit, mainly.
The only real limitation on what could be moved there and what couldn't is that they had to make sure not to put anything that was required for basic booting onto disk 2.
(Because if /bin/mount got moved to /usr/bin/mount, they wouldn't be able to mount disk 2)
So that pseudo-rule exists because of the chicken-and-egg problem you'd get into if important early-boot tools were on disk 2. So less important stuff ended up on disk 2, important boot stuff on disk 1.
Other than that, the only guideline for placing files was "where it'd fit"
So yeah. That decision made sometime between 1971 and 1973, to reuse /usr as a second drive of /bin & /lib (and possibly /sbin, I can't recall when that started), still echoes into modern linux.
Your brand new Ubuntu 18.10 has /bin and /usr/bin cause one specific system in 1971-1973 ran out of disk space on one of these 2.5MB fixed disk drives.

(This is the drive cartridge that goes into the RK05)
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to foone
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!