Command Line Interface (CLI) is a mechanism for interacting with a computer operating system or System software by typing commands to perform specific tasks. Windows Vista (ˈvɪstə is a line of Operating systems developed by Microsoft for use on Personal computers including home and business desktops cmdexe is the Command line interpreter on OS/2, Windows CE and on Windows NT -based operating systems (including Windows Windows Vista (ˈvɪstə is a line of Operating systems developed by Microsoft for use on Personal computers including home and business desktops An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination This contrasts with the use of a mouse pointer with a graphical user interface (GUI) to click on options, or menus on a Text user interface (TUI) to select options. In Computing, a mouse (plural mice, mouse devices, or mouses) TUI short for Text User Interface or Textual User Interface (and sometimes Terminal User Interface) is a Retronym that was coined sometime
This method of instructing a computer to perform a given task is referred to as "entering" a command: the system waits for the user to conclude the submitting of the text command by pressing the "Enter" key (a descendant of the "carriage return" key of a typewriter keyboard). A command line interpreter then receives, analyses, and launches the requested command. In Computer science and Linguistics, parsing, or more formally syntactic analysis, is the process of analyzing a sequence of tokens to
The command line interpreter may be a text terminal or a remote shell client such as PuTTY. A computer terminal is an electronic or electromechanical hardware device that is used for entering data into and displaying data from a Computer or a Computing Putty is a generic term for a plastic material similar in texture to Clay or Dough typically used in domestic construction and repair as a sealant or filler
Upon completion, the command usually returns output to the user in the form of text lines on the CLI. This output may be an answer if the command was a question, or otherwise a summary of the operation.
The concept of the CLI originated when teletype machines (TTY) were connected to computers in the 1950s, and offered results on demand, compared to 'batch' oriented mechanical punch card input technology. A teleprinter ( Dedicated text-based CRT terminals followed, with faster interaction and more information visible at one time, then graphical terminals enriched the visual display of information. The cathode ray tube (CRT is a Vacuum tube containing an Electron gun (a source of electrons and a Fluorescent screen with internal or A computer terminal is an electronic or electromechanical hardware device that is used for entering data into and displaying data from a Computer or a Computing Currently personal computers encapsulate both functions in software.
The CLI continues to coevolve with GUIs like those provided by Microsoft Windows, Mac OS and the X Window System. In a broad sense biological co-evolution is "the change of a biological object triggered by the change of a related object" Microsoft Windows is a series of Software Operating systems and Graphical user interfaces produced by Microsoft. Mac OS is the trademarked name for a series of Graphical user interface -based Operating systems developed by Apple Inc In some applications, such as MATLAB, a CLI is integrated with the GUI, with the benefits of both. MATLAB is a numerical computing environment and Programming language.
Contents |
A CLI is used whenever a large vocabulary of commands or queries, coupled with a wide (or arbitrary) range of options, can be entered more rapidly as text than with a pure GUI. This is typically the case with operating system command shells. In computing a shell is a piece of software that provides an interface for users Also, some computer languages (such as Python, Forth, LISP and many dialects of BASIC) provide an interactive command line mode to allow for experimentation. Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability Forth is a structured, imperative, stack-based, computer Programming language and programming environment Lisp (or LISP) is a family of Computer Programming languages with a long history and a distinctive fully parenthesized syntax In Computer programming, BASIC (an Acronym for Beginner's All-purpose Symbolic Instruction Code) is a family of High-level programming languages
CLIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. CLIs are also popular among people with visual disability, since the commands and feedbacks can be displayed using Refreshable Braille displays. A refreshable Braille display or Braille terminal is an electro-mechanical device for displaying Braille characters usually by means of raising dots through holes
A program that implements such a text interface is often called a command line interpreter or shell. In computing a shell is a piece of software that provides an interface for users Examples include the various Unix shells (sh, ksh, csh, tcsh, bash, etc. A Unix shell, is a command line shell that provides the traditional User interface for the Unix Operating system and for Unix-like ), the historical CP/M, and DOS's COMMAND.COM, the latter two based heavily on DEC's RSX and RSTS CLIs. CP/M (Control Program for Microcomputers is an Operating system originally created for Intel 8080 / 85 based Microcomputers by Gary Kildall DOS, short for "Disk Operating System" is a shorthand term for several closely related Operating systems that dominated the IBM PC compatible market COMMANDCOM is the filename of the default Operating system shell for DOS Operating systems and the default Command line interpreter Digital Equipment Corporation was a pioneering American company in the Computer industry RSX-11 is a family of Real-time operating systems mainly for PDP-11 computers created by Digital Equipment Corporation (DEC common in the late 1970s RSTS (pronounced as "RIST-ess" or "RIST-uhs" is a Multi-user Time-sharing Operating system, developed by Digital Equipment Corporation
In November 2006, Microsoft released version 1. Microsoft Corporation is an American multinational Computer technology Corporation, which rose to dominate the Home computer 0 of Windows PowerShell (formerly codenamed Monad), which combined features of traditional Unix shells with their object-oriented .NET Framework. Windows PowerShell is an extensible command-line shell and associated Scripting language from Microsoft MinGW and Cygwin are open source packages for Windows that offer a Unix like CLI. MinGW ( Minimalist GNU for Windows) formerly mingw32, is a native software port of the GNU Compiler Collection (GCC to Microsoft Windows Cygwin (ˈsɪɡwɪn is a collection of tools originally developed by Cygnus Solutions to provide in Microsoft Windows a command line and programming interface familiar Open source is a development methodology which offers practical accessibility to a product's source (goods and knowledge Microsoft provides MKS Inc.'s ksh implementation MKS Korn shell for Windows through their Services for UNIX add-on. This article is about MKS Inc the software vendor For other uses see MKS. The Korn shell ( ksh) is a Unix shell which was developed by David Korn ( AT&T Bell Laboratories) in the early 1980s Microsoft Windows Services for UNIX ( SFU) is a software package produced by Microsoft which provides a Unix subsystem and other parts of a full Unix
The latest versions of the Macintosh operating system are based on a variation of Unix called Darwin. Macintosh, commonly nicknamed Mac is a Brand name which covers several lines of Personal computers designed developed and marketed by Apple Inc Darwin is an open source UNIX -based computer Operating system released by Apple Inc On these computers, users can access a Unix-like command line interface called Terminal found in the Applications Utilities folder. (This terminal uses bash by default. Bash is a Free software Unix shell written for the GNU Project. )
Some applications provide both a CLI and a GUI. The engineering/scientific numerical computation package MATLAB provides no GUI for some calculations, but the CLI can handle any calculation. MATLAB is a numerical computing environment and Programming language. The three-dimensional-modelling program Rhinoceros 3D provides a CLI as well as a distinct scripting language. Rhinoceros (Rhino is a stand-alone commercial NURBS -based 3-D modeling tool developed by Robert McNeel & Associates 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. Oberon is an Operating system, originally developed as part of the NS32032 -based Ceres workstation project it is written entirely in the Oberon Smalltalk is an object-oriented, dynamically typed, reflective programming language.
A CLI can generally be considered as consisting of syntax and semantics. In Linguistics, syntax (from Ancient Greek grc συν- syn-, "together" and grc τάξις táxis, "arrangement" is the Semantics is the study of meaning in communication The word derives from Greek σημαντικός ( semantikos) "significant" from The syntax is the grammar that all commands must follow. In the case of operating systems (OS), MS-DOS and Unix each define their own set of rules that all commands must follow. An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination MS-DOS (short for M icro' s' oft D isk O perating S ystem is an Operating system commercialized by Microsoft. Unix (officially trademarked as UNIX, sometimes also written as Unix with Small caps) is a computer In the case of embedded systems, each vendor, such as Nortel, Juniper Networks or Cisco Systems, defines their own proprietary set of rules that all commands within their CLI conform to. An embedded system is a special-purpose Computer system designed to perform one or a few dedicated functions often with Real-time computing constraints Nortel Networks Corporation () formerly known as Northern Telecom Limited and sometimes known simply as Nortel, is a multinational Telecommunications Juniper Networks, Inc ( is an Information technology company based in Sunnyvale California and founded in 1996 These rules also dictate how a user navigates through the system of commands. In Computing, a command is a directive to a computer program acting as an interpreter of some kind in order to perform a specific task The semantics define what sort of operations are possible, and on what sort of data these operations can be performed.
Two different CLIs may agree on either syntax or semantics, but it is only when they agree on both that they can be considered sufficiently similar to allow users to use both CLIs without needing to relearn anything as well as enable re-use of scripts.
A simple CLI will display a prompt, accept a "command line" typed by the user terminated by the Enter key, then execute the specified command and provide textual display of results or error messages. In Computer keyboards the enter key (or the return key) in most cases causes a command line, window form or Dialog box to operate Advanced CLIs will validate, interpret and parameter-expand the command line before executing the specified command, and optionally capture or redirect its output.
Unlike a button or menu item in a GUI, a command line is typically self-documenting, stating exactly what the user wants done. In addition, command lines usually include many defaults that can be changed to customize the results. Useful command lines can be saved by assigning a character string or alias to represent the full command, or several commands can be grouped to perform a more complex sequence — for instance, compile the program, install it, and run it — creating a single entity, called a command procedure or script which itself can be treated as a command. In Computer programming and some branches of Mathematics, a string is an ordered Sequence of Symbols. In computing alias is a command in various Command line interpreters ( shells) such as Unix shells 4DOS / 4NT and Windows These advantages mean that a user must figure out a command or series of commands only once, because they can be saved, to be used again.
The commands given to a CLI shell are often in one of the following forms:
[doSomething] [how] [toFiles][doSomething] [how] [sourceFile] [destinationFile][doSomething] [how] < [inputFile] > [outputFile][doSomething] [how] | [doSomething] [how] | [do Something] [how] > [outputFile]doSomething is, in effect, 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. For English usage of verbs see the wiki article English verbs. The '>' in the third example is a redirection operator, 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 '>'. Programming languages generally support a set of operators that are similar to operators in mathematics. This will overwrite the file. Using '>>' will redirect the output and append it to the file. Another redirection operator 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. Note "broken bar" and the glyph "¦" redirect here
Some programming languages (such as BASIC, Python, LISP, Forth . In Computer programming, BASIC (an Acronym for Beginner's All-purpose Symbolic Instruction Code) is a family of High-level programming languages Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability Lisp (or LISP) is a family of Computer Programming languages with a long history and a distinctive fully parenthesized syntax Forth is a structured, imperative, stack-based, computer Programming language and programming environment . . ) also provide an interactive command line for experimentation or even for normal everyday work. What can we tell about this?
In some CLIs, the commands issued are not coupled to any conceptual place within a command hierarchy. A user can specify relative or absolute paths to any command or data. Examples of this include MS-DOS, Windows, and UNIX, which provide forms of a change directory command which allows access to any directory in the system. cd, sometimes also available as chdir ( ch ange dir ectory is a command line command to change the current Working directory Protection of resources is provided by a system of resource ownership by privileged groups, and password-protected user accounts which are members of specific groups. MS-DOS provides no such resource protection.
Other CLIs (such as those in routers) limit the set of commands that a user can perform to a subset, determined by location within a command hierarchy, grouped by association with security, system, interface, etc. The location within this hierarchy and the options available are often referred to as a mode. In these systems the user might traverse through a series of sub-hierarchies, each with their own subset of commands. For example, if the CLI had two modes called interface and system, the user would enter the word 'interface' at the command prompt and then enter an interface mode, where a certain subset of commands and data are available. At this point system commands are not accessible and would not be accessible until the user explicitly exits the interface mode.
A command prompt (or just prompt) is a sequence of (one or more) characters used in a command line interface to indicate readiness to accept commands. Its intent is to literally prompt the user to take action. A prompt usually ends with one of the characters $, %, #, :, > and often includes other information, such as the path of the current working directory. In Computing, the working directory of a process is a directory of a hierarchical File system, if any dynamically associated with each process
It is common for prompts to be modifiable by the user. Depending on the environment, they may include colors, special characters, and other elements like the current time, in order, for instance, to make the prompt more informative or visually pleasing, to distinguish sessions on various machines, or to indicate the current level of nesting of commands.
In DOS's COMMAND. COM and in the Windows command line interpreter cmd.exe the prompt is modifiable by issuing a prompt command or by changing the value of the %PROMPT% environment variable. cmdexe is the Command line interpreter on OS/2, Windows CE and on Windows NT -based operating systems (including Windows Environment variables are a set of dynamic values that can affect the way running processes will behave on a computer The default of most modern systems, the C:\> style is obtained, for instance, with "prompt $P$G". The default of older DOS systems, C> is obtained by just "prompt".
On many Unix systems, the $PS1 variable can be used, although other variables also may have an impact on the prompt (depending on what shell is being used). Unix (officially trademarked as UNIX, sometimes also written as Unix with Small caps) is a computer A Unix shell, is a command line shell that provides the traditional User interface for the Unix Operating system and for Unix-like In the bash shell, a prompt of the form
[time] user@host: work_dir $could be set by issuing the command
export PS1='[\t] \u@\H: $(pwd) $'In zsh the $RPROMPT variable controls an optional "prompt" on the right hand side of the display. Bash is a Free software Unix shell written for the GNU Project. The Z shell ( zsh) is a Unix shell that can be used as an Interactive login shell and as a powerful command interpreter for It is not a real prompt in that the location of text entry does not change. It is used to display information on the same line as the prompt, but right justified.
In RISC OS, the command prompt is a '*' symbol, and thus (OS)CLI commands are often referred to as "star commands"[1]. It is also possible to access the same commands from other command lines (such as the BBC BASIC command line), by preceding the command with a '*'.