Unlike a program that has a graphical user interface (GUI) like buttons and menus that are controlled my a mouse, a command line interpreter accepts lines of text from a keyboardas the commands and then converts those commands into functions that the operating system understands.
Any command line interpreter program is also often referred to in general as a command line interface. Less commonly, a command line interpreter is also called a CLI, command language interpreter, console user interface, command processor, shell, command line shell, or a command interpreter.
Why Are Command Line Interpreters Used?
If a computer can be controlled through easy-to-use applications that have a graphical interface, you might wonder why anyone would want to instead enter commands through command line. There are three main reasons...
The first is that you can automate the commands. There are many examples I could give but one is a script to always shutdown certain services or programs when the user first logs in. Another can be used to copy files of a similar format out of a folder so you don't have to sift through it yourself. These things can be done fast and automatically by using commands.
Another benefit to using a command line interpreter is that you can have direct access to the functions of the operating system. Advanced users may prefer the command line interface because of that concise and powerful access that it gives them.
However, simple and inexperienced users do not usually want to use a command line interface because they're definitely not as easy to use as a graphical program.
The available commands are not as obvious as a program that has a menu and buttons. You can't just open a command line interpreter and immediately know how to use it like you can with a regular graphical application you might download.
Command line interpreters are useful because while there may be a huge number of commands and options for controlling an operating system, it's possible that the GUI software on that operating system simply isn't built to utilize those commands. Also, a command line interpreter lets you use some of those commands while not having to use all of them at once, which is beneficial on systems that don't have the resources to run a graphical program.
More Information on Command Line Interpreters
In most Windows operating systems, the primary command line interpreter is Command Prompt. Windows PowerShell is a more advanced command line interpreter available alongside Command Prompt in more recent versions of Windows.
The command line interface on the macOS operating system is called Terminal.
Sometimes, both a command line interface and a graphical user interface are included within the same program. When this is the case, it's typical for one interface to support certain functions that are excluded in the other. It's usually the command line portion that includes more features because it provides raw access to the application files and isn't limited by what the software developer chose to include in the GUI.