This is a continuation of a discussion of the role of the command line in both the functionality and the culture of the three main operating systems used today general purpose desktop computers: Linux, and the other two.
Today’s toic: Underlying power.
Underlying all of this are two fundamental philosophical features of Linux vs. Windows, and for the most part Mac OSX falls in with Linux in this regard. One is the link between “commands” and the GUI and the other is the link between commands and configuration files, which in turn is par of the way in which applications are set up or “registered” on a system.
It is more or less true (and I oversimplify) that most Linux GUI software can be represented as a set of commands that could be entered on the command line. For some software there may be a totally different command for each function, and for other software, there may be a smaller number of commands with switches or options. There are some major exceptions to this, but it is very very common, and if you exclude all software that does not follow The Unix Philosophy then it will be generally true. This is not true in Windows. Not even close.
With respect to configurations and installation or registration of software, there is a more subtle but I think very real and important link between function and the command line approach. Commands can be placed into files. A command might do nothing more than open a certain text file (or create it if it does not exist) and change it or set the text to say a certain thing. This text is then the configuration data for some aspect of your system or your software. This whole approach of commands, text fields, and so on is played out on a file system that itself is both simple and significant. There are directories in the standard unix/Linux installation that are simply known, by the system and the software that runs on it, to contain information regarding the system. In Linux, go to your /proc directory and get a listing. You will see a lot of the ‘files’ in that directory are numbers. These numbers are process numbers. When you look at this listing, you are looking at the processes that are running on your system right now!!! It’s like looking at the mirror at a certain angle and seeing the thoughts that are in your brain represented as little blue dots or something!!! How cool is that?!?!
This exposes one of the great features of Linux: Everything is a file. You put a CD or DVD in the player, it becomes a file. An “iso” image on your hard drive and a CD with that image on it in your drive are, for all practical purposes, the same thing. What are they? Files! Your keyboard is a file. The list of software installed on your system is a file. A running piece of software is a file (in the /proc directory). Everything is a file, all files are text files (philosophically if not in reality), text files can contain lists of commands. How amazingly simple. How amazingly powerful. How amazingly unlike the Windows Registry. How amazingly accessible and understandable by both the tech expert you need to rely on and to you, if you decide to get into it.
Earlier on in this discussion I gave the example of how to make your computer squawk like a cuckoo bird. Go look back at that example. The cat command simply streams the text out of a file. The file being streamed here is an open source format audio file, so it is just a stream of text characters that are the data for sound. The data are being streamed out of the file, and into whatever is next in the sequence (the “pipe”) that the command represents. In this case, the output of the file is being streamed into a “file” which is actually the sound system on that computer. Since the sound system is actually a driver linked to some hardware, the text output of the audio file is played. This is so incredibly straight forward that it is easy to understand, difficult to screw up, and easy to fix. It is the way computers should work.
That simple yet powerful engineering, and the transparent and single layered connection between the files, the file system, and operations makes Linux so powerful and secure, but it is also what makes the command line not only necessary but a very powerful tool for those who chose to see it for what it is rather than what you are told.