Command-line interface

A command line interface (CLI) is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines). The program that manages the interface is called a command line interpreter or command line processor.

Most operating systems implement a command line interface in a shell for interactive access to the functions or services of the operating system. Such access was mainly provided to users through computer terminals from the mid-1960s, and continued to be used during the 1970s and 1980s in VAX / VMS, Unix systems and personal computer systems, including MS-DOS, CP / M and Apple DOS.

Today, many end users rarely, if ever, use command line interfaces and instead rely on graphical user interfaces and menu-guided interactions. However, many software developers of system administrators and advanced users still rely heavily on command line interfaces to perform tasks more efficiently, configure their machine, or access programs and program features that are not available through of a graphical interface.

Alternatives to the command line interface include, but are not limited to, text user interface menus (for example, IBM AIX SMIT), keyboard shortcuts, and several other pointer-centered desktop metaphors (usually controlled). with a mouse) Examples of this include versions 1, 2, 3, 3.1 and 3.11 of Microsoft Windows (an operating system shell that runs on DOS), DosShell and PowerPanel from Mouse Systems. Command line interfaces are often implemented on terminal devices that are also capable of screen-oriented text user interfaces that use cursor addressing to place symbols on a display screen.

Programs with command line interfaces are generally easier to automate using scripts.

Many software systems implement command line interfaces for control and operation. This includes programming languages, such as Tcl / Tk and PHP, as well as many utility programs, such as the WinZip compression utility and the File Transfer Protocol (FTP) and SSH / Telnet clients.

Apple Computer CommandShell screenshot in A / UX 3.0.1

Compared to a graphical user interface, a command line interface requires less system resources to implement. Since the options for the commands are given in a few characters on each command line, an experienced user finds the options easier to access. [Citation needed] The automation of repetitive tasks is simplified by editing lines and history mechanisms to store frequently used sequences; This can be extended to a scripting language that can take variable parameters and options. A command line history can be maintained, allowing for the revision or repetition of commands.

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

Operating system command line interfaces

The operating system (OS) command line interfaces are usually separate programs supplied with the operating system. A program that implements such a text interface is often called a command line interpreter, command processor, or shell.

Examples of command line interpreters include DEC's DIGITAL command language (DCL) in OpenVMS and RSX-11, the various Unix shells (sh, ksh, csh, tcsh, bash, etc.), CCP of CP / M, DOS COMMAND.COM, as well as the OS / 2 and Windows CMD.EXE programs, the latter groups are largely based on the DEC RSX-11 and RSTS CLI. In most operating systems, it is possible to replace the default shell program with alternatives; Examples include 4DOS for DOS, 4OS2 for OS / 2 and 4NT / Take Command for Windows.

Although the term 'shell' is often used to describe a command line interpreter, strictly speaking, a 'shell' can be any program that constitutes the user interface, including those fully graphically oriented. For example, the default Windows GUI is a shell program called EXPLORER.EXE, as defined in the SHELL = EXPLORER.EXE line in the WIN.INI configuration file. These programs are shells, but they are not CLI.

Application command line interfaces
Application programs (as opposed to operating systems) can also have command line interfaces.

An application program can support none, none or all of these three main types of command line interface mechanisms:

  • Parameters: Most operating systems support a means to pass additional information to a program when it starts. When a program is started from an operating system command line shell, the additional text provided along with the program name is passed to the started program.
  • Interactive command line sessions: after startup, a program can provide an operator with a separate means to enter commands in text form.
  • Communication between processes: most operating systems support means of communication between processes (for example, standard flows or named pipes). The command lines of the client processes can be redirected to a CLI program by one of these methods.
    Some applications only support one CLI, submitting a CLI request to the user and acting on the command lines as they enter. Other programs support both a CLI and a GUI. In some cases, a GUI is simply a container around a separate CLI executable file. In other cases, a program may provide a CLI as an optional alternative to its GUI. CLIs and GUIs often support different functionalities. For example, all the features of MATLAB, a numerical analysis software, are available through the CLI, while the MATLAB GUI exposes only a subset of features.

Sierra's first games, such as the first three games of King's Quest (1984–1986), used commands from an internal command line to move the character in the graphics window.

Was this answer helpful?