article

A command line interface or CLI is a method of interacting with a computer via a text terminal. Commands are entered as lines of text (that is, sequences of typed characters) from a keyboard, and output is also received as text. CLIs originated when teletype machines were connected to computers in the 1950s. In terms of immediate interaction and feedback, they represented an advance over the use of punch cards.

With the use of CRTs as interface devices, CLIs began evolving toward graphical user interfaces (GUIs) like Microsoft Windows, Mac OS, and the X Window System and were largely supplanted by GUIs when Microsoft, in response to the success of Apple's release of the Macintosh OS in 1984, introduced Windows the following year. Nevertheless, a significant minority of computer users prefer to use CLIs, because they feel that CLIs provide an environment with enhanced productivity. They are most often used by programmers and system administrators, especially in Unix-based operating systems; in engineering and scientific environments; and by a smaller subset of technically advanced home users. CLIs are also popular among people with visual disability.

In its simplest form, a CLI displays a prompt, the user types a command on the keyboard and terminates the command (usually with the Enter key), and the computer executes the command, providing textual output.

A program that implements such interface is often called a command line interpreter or shell. Examples include the various Unix shells (sh, ksh, csh, tcsh, bash, etc.), the historical CP/M, and DOS's command.com ("Command Prompt"), the latter two based heavily on DEC's RSX and RSTS CLIs. In late 2006, Microsoft plans to release Windows PowerShell (formerly codenamed Monad), which hopes to combine features of traditional Unix shells with their object-oriented .NET Framework. Windows' current CLI programs like DOS and Windows Script Host are commonly considered inadequate or insecure. MinGW is a third-party software for Windows that offers a true Unix CLI.

Some applications provide both a CLI and a GUI. One example is the CAD program AutoCAD. The engineering/scientific numerical computation package MATLAB provides no GUI for some calculations, but the CLI can handle any calculation. The three-dimensional-modelling program Rhinoceros 3D (used to design the cases of most cell phones, as well as thousands of other industrial products) provides a CLI (whose language, by the way, is distinct from Rhino's scripting language). In some computing environments, such as the Oberon or Smalltalk user interface, most of the text which appears on the screen may be used for giving commands.

The commands given to a CLI are often of the form

*

or

*" target="_blank" >> [outputFile

doSomething is in effect to a verb, how an adverb (for example, should the command be executed "verbosely" or "quietly") and toFiles an object or objects (typically one or more files) on which the command should act. The '>' in the second example is a redirection character, telling the command line interpreter to send the output of the command not to the screen but to the file named on the right of the '>'. Another redirection character is the pipe ('|'), which tells the CLI to use the output of one command as the input to the next command; this "operator-stream" mechanism can be very powerful.

See also


External links


User interface | Software engineering | Software architecture

Příkazový řádek | Kommandozeile | Línea de órdenes | Invite de commande | 명령 선 공용영역 | Parancssoros felhasználói felület | Opdrachtlijn Interface | キャラクターユーザインターフェース | Wiersz poleceń | Príkazový riadok | Komentoliittymä | 命令行界面

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Command line interface".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld