Why does ~ represent the home folder on macOS and Linux?

Whether you’ve installed the Linux subsystem on Windows 10 or are starting to use the Linux Terminal, there are all kinds of shortcuts you need to learn … none of which are intuitive.

To the example There is the tilde ~ which represents your home folder. Tap cd ~/Documents switches to the Documents folder in the current user’s home directory, which saves me typing /Users/justinpot/Documents every time. It’s a convenient abbreviation, sure, but why is that particular character used for it?

Believe it or not, it’s because of a keyboard from the 1970s. Here is a Lear Siegler ADM-3A terminal that was first shipped in 1975.

This was a “dumb terminal,” which means it wasn’t a computer in itself, but rather enabled you to enter commands into a computer and view data from it. The ADM-3A was only $ 995, which was a good price or not at the time, meaning institutions could buy multiple such terminals to connect to a central computer. To this day, modern “terminal emulators” such as those used in Linux and macOS imitate the functionality of such systems.

It’s a very influential piece of hardware; A lot of early software development took place on it, which means that the keyboard layout influenced some design decisions. Listen:

Do you notice anything? Here is a clearer picture.

Do you see the key in the top right? This is the HOME key, which works similarly to the Home key on modern keyboards and moves the cursor to the top left position when editing text. It’s also the key to the tilde symbol: ~ . That association was enough for ~ to finally show home folders.

Correct: Linux and UNIX-based systems use a special keyboard from over forty years ago ~ To represent home, though the ~ and home keys couldn’t be further apart on most modern keyboards. Crazy, right?

And there are other details hidden in this keyboard. Do you see the arrows on the H, J, K, and L keys? Hold down the Ctrl key and press these keys to move the cursor in the terminal, which is why the same keys are used to move the cursor in vi. These vi keyboard shortcuts, in turn, inspired the keyboard shortcuts in Gmail. Twitter and even Facebook. That’s right: even Facebook’s keyboard shortcuts were inspired by a “stupid terminal” that was first sold in 1975.

Keep looking and you will find that you see a couple of keys that you don’t recognize at all. There’s the “here it is” key, the blogger Dave Cheney explains here . Basically, it confirmed who you are over the network. You’ll also see that the Escape key on modern keyboards is in places where the Caps Lock key is, which sheds new light on the controversy surrounding the MacBook touchbar’s Escape key. I am sure there are many other details that I am missing.

A device you’ve never heard of influenced design decisions that are used in software that people still use over forty years later. Isn’t history strange?

Credit: Chris Jacobs , Stuart Brady , Eric Fischer

Related Posts