Taking Command of Your Machine

Background

As an industry we have come full circle. Through the 1980's the command line interface (CLI) was the only way for administrators and developers to interact with computers. In 1984, Apple disrupted the personal computer market with the introduction of the Macintosh, launched during the SuperBowl with their iconic "1984" television ad [1]:


The following year, IBM and Microsoft entered into a "Join Development Agreement" to build a new graphical operating system resulting in OS/2 1.1 shipping in late 1988 with the Presentation Manager graphical interface [2]:


Microsoft parted ways with IBM and in 1990 introduced Windows 3.0 becoming a huge commercial success and eventually crushing OS/2 [3]:


For the last thirty years, the graphical user interface (GUI) has dominated the computer industry, with at least an entire generation of IT workers having been raised and trained on using a mouse to point and click around the screen to accomplish tasks. Today's smart devices with touch screens are a direct result of these earlier graphical approaches. For varied work and discoverability this style of interaction works very well.



Shell Shocked

While graphical interfaces have dominated the last three decades, the shell program has continued to quietly exist and improve. Also known as command shell or just shell, this text-based interface is a way to type in commands for the machine to execute. While there are many dozens and even hundreds of commands most people use a small subset of commands all the time.


If you have ever watched an experienced tech person or developer input commands into a shell, you know how shockingly fast they can do things - so fast you can't follow it all. Why is that? Because they have used these same commands so many times it has become almost muscle memory to them. In addition, text-based shell interfaces use a tiny fraction of computing resources as compared to graphical interfaces so they are very responsive - faster than even the fastest typist. Rather than clicking through several screens (and waiting for graphical windows to be displayed) to get to the place where you can change a setting, you type a few letters and then press the Tab key - similar to auto-completion on a smartphone or virtual keyboard. The speed with which a few letters can be typed cannot be matched by clicking a mouse over and over.


Shell commands follow a simple pattern of the name of the command followed by optional flags (a.k.a. options) and then arguments:



In the example above the command is "ls" which lists the contents of a directory followed by a lowercase "ell" (-l) for long format and then an argument of "/tmp" which is the directory whose contents will be listed. Commands also have default options and arguments so you don't have to type them all unless you wish for something different. For example, if you don't supply a specific directory name with the "ls" command then the current directory will be displayed.


More significantly, the commands that are typed in can also be stored in a text file and executed by the shell bringing us closer to IT nirvana - automation. Amazon, Google, and Microsoft cloud administrators do not set up tens of thousands of servers around the globe using a mouse and graphical interface. They use scripts containing the necessary commands and steps enabling them to be executed perfectly every time without deviation.


You can also create your own scripts by saving the commands in a text file with a ".bat" filename extension for Windows or ".sh" for Linux. I will cover more of this in future posts so I hope this has piqued your interest in trying (old) new things and increasing your skills.



References

[1] Wikipedia contributors, "Macintosh", Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=Macintosh&oldid=995004833 (accessed December 20, 2020).

[2] Wikipedia contributors, "OS/2", Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=OS/2&oldid=995235857 (accessed December 20, 2020).

[3] Wikipedia contributors, "Microsoft Windows", Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=Microsoft_Windows&oldid=994062500 (accessed December 20, 2020).


Recent Posts

See All

JUnit and Maven Resources

Here are some resources to help with learning JUnit and Maven. This list was originally prepared for students taking CS-320 Software Testing, Automation and Quality Assurance. Using JUnit in Eclipse E