Have you ever wondered why Linux commands are so short and strange? Teletypewriters and Unix is the answer.
Let’s face it, Linux commands are weird. Cat, mv, ls, pwd, they are all so short. Why this? The answer, as with many things in Linux, lies in its Unix origins.
The origin of the Linux commands
In the 1960s, when Unix was first developed, the main route to interactively communicate with computers was through Teletype machines. These devices were essentially typewriters that could receive signals from other machines. Teletype used to be responsible for long-distance communication and telegraphy.
You can see one in action in this video:
These machines took up a lot of space, were noisy, and quite slow. This last problem was especially annoying when interacting with a computer. One way to make typing faster was to make the commands shorter.
These teleprinters were also known as TTYs and are the reason why Unix terminals are called. are known / dev / ttyX today.
Teletype and Linux today
Although we don’t use teletypes with computers these days, they still remain in the design of Unix and Linux systems today.
In the 1970s, teleprinters began to give way to video terminals that displayed text on the screen instead of rolls of paper. In the 1980s, graphical interfaces such as those of the X Window System began to become popular.
Many older programs used the terminal to interact with the system. But how do these programs still work in the age of Windows managers and GUI? The answer is Pseudo terminal. This is system software that emulates the capabilities of a terminal in software. As for command line programs, they think they are talking to a teletype.
Modern Linux systems continue this design. The Linux file system lists pseudo-end devices as / dev / ptyX.
Linux continues the Unix tradition
The moral of the story is that Linux, as modern as it is, embodies ideas that are over 50 years old.
The ability of Unix-like systems to adapt to technological changes while maintaining compatibility with legacy software is one reason technical users have relied on them for so long, and Linux is no exception. While Linux commands may be short, you can use shell aliases to make them even shorter.
Image source: Arnold Reinhold / Wikimedia Commons
Tired of typing long commands every time you open your Terminal? Use Linux command aliases to make it easier for you.
About the author