I have been using, studying and developing for Linux for quite a few years now, and over time, I have successfully convinced a few people to join the cause, and make the switch to Linux.However, when these people went discovering this brand new world, every one of them eventually came to me, asking what the command was to do this or that:What's the command to install a piece of software?What's the command to list currently directory contents?What's the command to open my web browser?...To me though, it feels like they are asking the wrong questions. Indeed, I would actually expect them to ask:What program do we use to manage software installed on the system?What program can list current directory contents?What are the available web browsing programs?...It would seem to me that the term command is a very abstract word used to describe pretty much everything you type after your shell prompt. With this thinking, several of the newcomers I brought started to believe that:Linux is made of a huge amount of commands.There is a command for everything, and every command does one thing specifically.By learning more commands, I'll become more capable as a Linux user/administrator.By running ./something I don't run a command, but a program stored in my current directory, probably something I compiled myself....Due to that, I tend not to use the word command, and prefer to use program or executable file. I also explain that these executable files can be found automatically, without typing their absolute paths, thanks to the $PATH mechanism. Thanks to that, typing ls executes /bin/ls, which is a program stored in /bin, a directory registered within the $PATH variable.Still, I come across the word command in many books, tutorials, guides, ... which eventually brought this question to my mind: does the word command actually have a meaning in the UNIX/Linux vocabulary? Does it refer to an actual concept other than whatever you type in your terminal?
What is the concept hidden behind the term command?
command line;command;terminology
The POSIX shell spec refers to simple commands, compound commands, command position, and the command command.The first two reference how/when a shell command is parsed and executed. For instance:#one compound command{ simple command; simple command && simple command; } The compound command is how much the shell must read in as input before evaluating and executing its constituent simple commands.command position is the first word in each simple command and it has special significance in that it determines how the rest of the command is to be parsed. Certain reserved words, (such as if and while), when in command position, can indicate to the parser that what follows should be interpreted as a compound command and not merely a simple command.The command command can serve to move a command out of command position. For instance, these two would be executed identically, but potentially parsed differently:command simple commandsimple command