Lably
Skip to content

Command-line interface

Means of entering commands to software

  • 33 min read
  • 8 chapters

Related on Lably

Through Software, Command (computing) and User (computing)

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 utilities for operating system management and software development provide CLIs.

Many CLIs enable software automation, since commands can be stored in a script file 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-based menuing (including DOS Shell and IBM AIX SMIT), and keyboard shortcuts.

Comparison to graphical user interfaces

Compared with a graphical user interface, a command-line interface requires fewer system resources to implement. Since options to commands are given in a few characters in each command line, an experienced user often finds the options easier to access. Automation of repetitive tasks is simplified by line editing and history mechanisms for storing recently or frequently used sequences, allowing review and repetition of commands; this may extend to a scripting language that can take parameters and variable options.

A command-line system may require online or paper manuals for the user's reference, although often a help option provides a concise review of the options of a command. The command-line environment may not provide graphical enhancements such as different fonts or extended edit windows found in a GUI. It may be difficult for a new user to become familiar with all the commands and options available, compared with the icons and drop-down menus of a graphical user interface, without reference to manuals.

Sign in to keep reading

7 more chapters are free with a Lably account.

More in Computing and communication