Topic summary
Command-line interface

A command-line interface (CLI), also known as a command-line shell, is a means of interacting with software via commands – each formatted as a line of text. The concept of interacting with a computer via text evolved over two decades, transitioning from physical hardware to sophisticated software. Before the CLI, computers were programmed using physical switches or punched cards. The shift toward a "command" style interaction began with the use of Teleprinters (Teletypes). Early systems like the Whirlwind I (1951) at MIT began utilizing typewriter-like inputs for direct control, moving away from batch processing where you'd hand a stack of cards to an operator and wait hours for a result. Devices like the Teletype Model 33, introduced in 1963, allowed operators to type a command and receive a printed response from the computer.
The command-line interpreter emerged when computers became powerful enough to handle multiple users at once, known as Time-Sharing. The Compatible Time-Sharing System (CTSS), developed in 1961 at MIT, introduced the first true command-line interpreter. For the first time, a user could type a command like LOGIN or PRINT, and a dedicated program (the supervisor) would parse that text and execute the corresponding function. In 1964, Louis Pouzin introduced the software we now recognize as a "shell" for the Multics operating system, providing a programmable environment for executing scripts. Many operating system and software developmentutilities provide CLIs.
Many CLIs enable automatingprograms since commands can be stored in a scriptfile that can be used repeatedly. A script allows its contained commands to be executed as a group (as a single program).
Alternatives to a CLI include a GUI (including the desktop metaphor such as Windows), text-basedmenuing (including DOS Shell and IBM AIX SMIT), and keyboard shortcuts.