Javascript required
Skip to content Skip to sidebar Skip to footer

What Is the Name of the Interface That Uses Graphics as Compared to a Command-driven Interface

Type of computer interface based on entering text commands and viewing text output

A command-line interface (CLI) processes commands to a computer program in the grade of lines of text. The programme which handles the interface is called a command-line interpreter or command-line processor. Operating systems implement a command-line interface in a beat for interactive access to operating system functions or services. Such access was primarily provided to users past computer terminals starting in the mid-1960s, and continued to be used throughout the 1970s and 1980s on VAX/VMS, Unix systems and personal reckoner systems including DOS, CP/M and Apple DOS.

Today, many users rely upon graphical user interfaces and menu-driven interactions. Even so, some programming and maintenance tasks may not have a graphical user interface and may still apply a command line.

Alternatives to the command line interface include text-based user interface menus (for case, IBM AIX SMIT), keyboard shortcuts, and various desktop metaphors centered on the pointer (usually controlled with a mouse). Examples of this include the Microsoft Windows, DOS Shell, and Mouse Systems PowerPanel. Command-line interfaces are often implemented in terminal devices that are besides capable of screen-oriented text-based user interfaces that use cursor addressing to place symbols on a display screen.

Programs with command-line interfaces are generally easier to automate via scripting.

Many software systems implement command-line interfaces for control and operation. This includes programming environments and utility programs.

Comparison to graphical user interfaces [edit]

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

A command-line system may require paper or online 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 non provide graphical enhancements such every bit different fonts or extended edit windows found in a GUI. It may be hard for a new user to become familiar with all the commands and options bachelor, compared with the icons and drop-downward menus of a graphical user interface, without repeated reference to manuals.

Types [edit]

Operating system command-line interfaces [edit]

Operating system (OS) control-line interfaces are usually distinct programs supplied with the operating system. A program that implements such a text interface is oft called a command-line interpreter, command processor or shell.

Examples of control-line interpreters include Dec's DIGITAL Command Language (DCL) in OpenVMS and RSX-11, the various Unix shells (sh, ksh, csh, tcsh, zsh, Bash, etc.), CP/M's CCP, DOS' Control.COM, also as the Bone/2 and the Windows CMD.EXE programs, the latter groups being based heavily on Dec'due south RSX-11 and RSTS CLIs. Under nearly operating systems, information technology is possible to replace the default shell programme with alternatives; examples include 4DOS for DOS, 4OS2 for OS/two, and 4NT / Take Command for Windows.

Although the term 'crush' is ofttimes used to describe a command-line interpreter, strictly speaking, a 'beat' can be any plan that constitutes the user-interface, including fully graphically oriented ones. For case, the default Windows GUI is a crush programme named EXPLORER.EXE, as defined in the SHELL=EXPLORER.EXE line in the WIN.INI configuration file. These programs are shells, but non CLIs.

Awarding command-line interfaces [edit]

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

An application programme may support none, whatsoever, or all of these iii major types of control-line interface mechanisms:

  • Parameters: About operating systems support a means to pass additional information to a program when it is launched. When a program is launched from an OS command-line shell, additional text provided forth with the programme proper name is passed to the launched program.
  • Interactive command-line sessions: After launch, a program may provide an operator with an independent means to enter commands in the form of text.
  • Inter-procedure communication: Nigh operating systems support means of inter-process advice (for example, standard streams or named pipes). Command lines from customer processes may exist redirected to a CLI plan past one of these methods.

Some applications support only a CLI, presenting a CLI prompt to the user and acting upon command lines as they are entered. Other programs support both a CLI and a GUI. In some cases, a GUI is only a wrapper effectually 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 functionality. For example, all features of MATLAB, a numerical analysis computer program, are available via the CLI, whereas the MATLAB GUI exposes only a subset of features.

The early Sierra games, such as the start three Male monarch's Quest games (1984–1986), used commands from an internal command line to move the character effectually in the graphic window.

History [edit]

The command-line interface evolved from a form of dialog once conducted by humans over teleprinter (TTY) machines, in which human operators remotely exchanged information, usually i line of text at a time. Early reckoner systems oftentimes used teleprinter machines as the ways of interaction with a human being operator. The figurer became one end of the human-to-man teleprinter model. So instead of a human communicating with some other human over a teleprinter, a human communicated with a computer.

The mechanical teleprinter was replaced past a "glass tty", a keyboard and screen emulating the teleprinter. "Smart" terminals permitted additional functions, such equally cursor motion over the entire screen, or local editing of data on the concluding for transmission to the calculator. Every bit the microcomputer revolution replaced the traditional – minicomputer + terminals – time sharing compages, hardware terminals were replaced past terminal emulators — PC software that interpreted terminal signals sent through the PC'due south serial ports. These were typically used to interface an organisation'southward new PC'south with their existing mini- or mainframe computers, or to connect PC to PC. Some of these PCs were running Bulletin Lath System software.

Early operating arrangement CLIs were implemented as part of resident monitor programs, and could not easily be replaced. The first implementation of the shell as a replaceable component was role of the Multics fourth dimension-sharing operating system.[1] In 1964, MIT Computation Center staff member Louis Pouzin adult the RUNCOM tool for executing command scripts while allowing statement substitution.[two] Pouzin coined the term "crush" to describe the technique of using commands similar a programming language, and wrote a paper about how to implement the idea in the Multics operating organisation.[3] Pouzin returned to his native France in 1965, and the start Multics shell was developed by Glenda Schroeder.[ii]

The first Unix shell, the V6 beat out, was developed by Ken Thompson in 1971 at Bell Labs and was modeled after Schroeder'southward Multics shell.[4] [5] The Bourne shell was introduced in 1977 equally a replacement for the V6 shell. Although information technology is used as an interactive control interpreter, it was also intended as a scripting linguistic communication and contains most of the features that are ordinarily considered to produce structured programs. The Bourne shell led to the evolution of the KornShell (ksh), Almquist crush (ash), and the popular Bourne-again crush (or Bash).[5]

Early microcomputers themselves were based on a command-line interface such equally CP/M, DOS or AppleSoft BASIC. During the 1980s and 1990s, the introduction of the Apple tree Macintosh and of Microsoft Windows on PCs saw the command line interface as the principal user interface replaced by the Graphical User Interface. The command line remained bachelor as an alternative user interface, often used past organisation administrators and other advanced users for system administration, computer programming and batch processing.

In November 2006, Microsoft released version 1.0 of Windows PowerShell (formerly codenamed Monad), which combined features of traditional Unix shells with their proprietary object-oriented .NET Framework. MinGW and Cygwin are open up-source packages for Windows that offer a Unix-like CLI. Microsoft provides MKS Inc.'s ksh implementation MKS Korn shell for Windows through their Services for UNIX add-on.

Since 2001, the Macintosh operating organization macOS has been based on a Unix-like operating organization called Darwin. On these computers, users can admission a Unix-similar command-line interface past running the final emulator program called Last, which is constitute in the Utilities sub-folder of the Applications folder, or by remotely logging into the machine using ssh. Z shell is the default vanquish for macOS; Fustigate, tcsh, and the KornShell are also provided. Before macOS Catalina, Bash was the default.

Usage [edit]

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 than rapidly as text than with a pure GUI. This is typically the example with operating system control shells. CLIs are also used by systems with bereft resources to support a graphical user interface. Some computer language systems (such as Python, Along, LISP, Rexx, and many dialects of Basic) provide an interactive command-line mode to allow for rapid evaluation of code.

CLIs are often used past programmers and arrangement administrators, in engineering science and scientific environments, and by technically advanced personal computer users. CLIs are also popular among people with visual disabilities since the commands and responses can be displayed using refreshable Braille displays.

Anatomy of a vanquish CLI [edit]

The general pattern of an OS command line interface[6] [seven] is:

Prompt command param1 param2 param3 … paramN        
  • Prompt — generated past the program to provide context for the client.
  • Command — provided by the client. Commands are usually one of three classes:
    1. Internal commands are recognized and candy by the command line interpreter itself and not dependent upon any external executable file.
    2. Included commands run divide executable files mostly considered function of the operating surroundings and always included with the Os.
    3. External commands run executable files that are non office of the basic OS, but added by other parties for specific purposes and applications.
  • param1 …paramN — Optional parameters provided past the customer. The format and pregnant of the parameters depends upon the command issued. In the example of Included or External commands, the values of the parameters are delivered to the program (specified by the Control) as it is launched by the Os. Parameters may exist either Arguments or Options.

In this case, the delimiters between command-line elements are whitespace characters and the cease-of-line delimiter is the newline delimiter. This is a widely used (but not universal) convention for command-line interfaces.

A CLI can more often than not be considered as consisting of syntax and semantics. The syntax is the grammar that all commands must follow. In the case of operating systems, DOS and Unix each define their ain set of rules that all commands must follow. In the instance 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 arrange to. These rules also dictate how a user navigates through the system of commands. The semantics ascertain what sort of operations are possible, on what sort of data these operations tin can be performed, and how the grammar represents these operations and data—the symbolic meaning in the syntax.

Ii different CLIs may agree on either syntax or semantics, just it is only when they agree on both that they tin can exist considered sufficiently similar to permit users to use both CLIs without needing to larn anything, too every bit to enable re-apply of scripts.

A elementary CLI volition display a prompt, have a "command line" typed past the user terminated past the Enter fundamental, then execute the specified command and provide textual brandish of results or mistake letters. Advanced CLIs will validate, translate and parameter-expand the command line before executing the specified command, and optionally capture or redirect its output.

Dissimilar a push or menu item in a GUI, a command line is typically cocky-documenting, stating exactly what the user wants washed. In improver, command lines normally include many defaults that can exist changed to customize the results. Useful control lines can exist saved past assigning a grapheme string or allonym to correspond the full control, or several commands tin can be grouped to perform a more circuitous sequence – for instance, compile the program, install it, and run it — creating a unmarried entity, called a command process or script which itself can be treated as a command. These advantages hateful that a user must figure out a circuitous command or series of commands simply once, because they can be saved, to exist used again.

The commands given to a CLI shell are oft in ane of the following forms:

  • doSomething how toFiles
  • doSomething how sourceFile destinationFile
  • doSomething how < inputFile > outputFile
  • doSomething how | doSomething how | doSomething how > outputFile

where doSomething is, in event, a verb, how an adverb (for case, 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 third case is a redirection operator, telling the command-line interpreter to send the output of the command not to its ain standard output (the screen) only to the named file. This volition overwrite the file. Using >> volition redirect the output and suspend it to the file. Another redirection operator is the vertical bar (|), which creates a pipeline where the output of i command becomes the input to the next command.

CLI and resource protection [edit]

One can alter the prepare of available commands by modifying which paths appear in the PATH environment variable. Under Unix, commands likewise demand be marked as executable files. The directories in the path variable are searched in the order they are given. By re-ordering the path, ane tin run e.g. \OS2\MDOS\E.EXE instead of \OS2\East.EXE, when the default is the contrary. Renaming of the executables also works: people often rename their favourite editor to EDIT, for case.

The command line allows i to restrict bachelor commands, such as admission to advanced internal commands. The Windows CMD.EXE does this. Often, shareware programs will limit the range of commands, including press a command 'your administrator has disabled running batch files' from the prompt.[ description needed ]

Some CLIs, such as those in network routers, accept a bureaucracy of modes, with a different set of commands supported in each mode. The set of commands are grouped by association with security, system, interface, etc. In these systems the user might traverse through a serial of sub-modes. For instance, if the CLI had two modes called interface and system, the user might employ the command interface to enter the interface manner. At this point, commands from the system mode may non be attainable until the user exits the interface mode and enters the organisation mode.

Command prompt [edit]

Prompt of a BBC Micro afterward switch-on or hard reset

A command prompt (or just prompt) is a sequence of (1 or more) characters used in a command-line interface to betoken readiness to accept commands. It literally prompts the user to take action. A prompt usually ends with one of the characters $, %, #,[8] [9] :, > or - [10] and often includes other information, such as the path of the electric current working directory and the hostname.

On many Unix and derivative systems, the prompt usually ends in $ or % if the user is a normal user, simply in # if the user is a superuser ("root" in Unix terminology).

End-users can frequently alter prompts. Depending on the surroundings, they may include colors, special characters, and other elements (like variables and functions for the electric current time, user, shell number or working directory) in order, for instance, to make the prompt more than informative or visually pleasing, to distinguish sessions on various machines, or to point the current level of nesting of commands. On some systems, special tokens in the definition of the prompt can be used to cause external programs to exist called by the control-line interpreter while displaying the prompt.

In DOS' COMMAND.COM and in Windows NT's cmd.exe users can modify the prompt by issuing a PROMPT control or past directly changing the value of the corresponding %PROMPT% environs variable. The default of most mod systems, the C:\> style is obtained, for instance, with PROMPT $P$K. The default of older DOS systems, C> is obtained by but PROMPT, although on some systems this produces the newer C:\> style, unless used on floppy drives A: or B:; on those systems PROMPT $N$G can exist used to override the automatic default and explicitly switch to the older mode.

Many Unix systems characteristic the $PS1 variable (Prompt String 1),[11] although other variables besides may affect the prompt (depending on the shell used). In the Bash shell, a prompt of the form:

                        [time]            user@host: work_dir $          

could be ready by issuing the command

                        export            PS1            =            '[\t] \u@\H: \Westward $'          

In zsh the $RPROMPT variable controls an optional "prompt" on the right-hand side of the brandish. Information technology is not a real prompt in that the location of text entry does not change. It is used to brandish data on the aforementioned line every bit the prompt, only right-justified.

In RISC OS the command prompt is a * symbol, and thus (Os) CLI commands are often referred to every bit "star commands".[12] One can as well access the aforementioned commands from other command lines (such as the BBC BASIC control line), past preceding the command with a *.

Arguments [edit]

An MS-DOS command line, illustrating parsing into command and arguments

A command-line statement or parameter is an item of information provided to a program when it is started. A program can have many command-line arguments that identify sources or destinations of information, or that change the operation of the program.

When a command processor is active a plan is typically invoked by typing its name followed by command-line arguments (if whatsoever). For example, in Unix and Unix-like environments, an example of a command-line argument is:

"file.s" is a command-line argument which tells the program rm to remove the file "file.due south".

Some programming languages, such as C, C++ and Java, let a program to interpret the command-line arguments by handling them as cord parameters in the main office. Other languages, such equally Python, expose operating system specific API (functionality) through sys module, and in particular sys.argv for "control-line arguments".

In Unix-like operating systems, a single hyphen used in place of a file proper noun is a special value specifying that a plan should handle data coming from the standard input or send data to the standard output.

Control-line option [edit]

A control-line option or simply option (too known equally a flag or switch) modifies the operation of a command; the event is determined by the command's plan. Options follow the control proper noun on the command line, separated by spaces. A space before the first option is not always required, such as Dir/? and DIR /? in DOS, which have the same effect[10] of list the DIR command's bachelor options, whereas dir --help (in many versions of Unix) does require the choice to be preceded by at least one space (and is case-sensitive).

The format of options varies widely between operating systems. In near cases the syntax is by convention rather than an operating organization requirement; the unabridged command line is simply a cord passed to a program, which can process it in any manner the programmer wants, so long equally the interpreter tin can tell where the command name ends and its arguments and options begin.

A few representative samples of command-line options, all relating to list files in a directory, to illustrate some conventions:

Operating organization Command Valid alternative Notes
OpenVMS directory/possessor Dir /Owner instruct the directory command to also display the ownership of the files.
Notation the Directory command proper name is not case sensitive, and can be abbreviated to equally few letters as required to remain unique.
Windows DIR/Q/O:South d* dir /q d* /o:due south display buying of files whose names begin with "D", sorted by size, smallest first.
Note spaces around argument d* are required.
Unix-like systems ls -lS D* ls -Due south -l D* display in long format files and directories showtime with "D" (but not "d"), sorted by size (largest first).
Note spaces are required around all arguments and options, simply some can be run together, e.one thousand. -lS is the aforementioned equally -l -Southward.
Information General RDOS CLI list/e/s 04-26-fourscore/b Listing /S/Eastward 4-26-80/B list every attribute for files created before 26 April 1980.
Note the /B at the end of the date argument is a local switch, that modifies the meaning of that argument, while /Southward and /E are global switches, i.e. apply to the whole control.
Abbreviating commands [edit]

In Multics, command-line options and subsystem keywords may be abbreviated. This idea appears to derive from the PL/I programming language, with its shortened keywords (eastward.g., STRG for STRINGRANGE and DCL for DECLARE). For case, in the Multics "forum" subsystem, the -long_subject parameter can be abbreviated -lgsj. It is too common for Multics commands to be abbreviated, typically corresponding to the initial letters of the words that are strung together with underscores to course command names, such as the apply of did for delete_iacl_dir.

In some other systems abbreviations are automatic, such every bit permitting enough of the offset characters of a control name to uniquely identify information technology (such as SU as an abridgement for SUPERUSER) while others may have some specific abbreviations pre-programmed (e.g. MD for MKDIR in Command.COM) or user-divers via batch scripts and aliases (e.g. allonym dr. mkdir in tcsh).

Selection conventions in DOS, Windows, OS/2 [edit]

On DOS, Os/two and Windows, different programs called from their Command.COM or CMD.EXE (or internal their commands) may employ different syntax within the same operating system. For example:

  • Options may be indicated by either of the "switch characters": /, -, or either may exist immune. See below.
  • They may or may not be example-sensitive.
  • Sometimes options and their arguments are run together, sometimes separated by whitespace, and sometimes by a grapheme, typically : or =; thus Prog -fFilename, Prog -f Filename, Prog -f:Filename, Prog -f=Filename.
  • Some programs allow single-character options to be combined;[10] others do not. The switch -fA may mean the same equally -f -A,[10] or it may be wrong, or it may even be a valid but different parameter.

In DOS, Bone/2 and Windows, the forward slash (/) is nigh prevalent, although the hyphen-minus is also sometimes used. In many versions of DOS (MS-DOS/PC DOS 2.xx and higher, all versions of DR-DOS since five.0, equally well every bit PTS-DOS, Embedded DOS, FreeDOS and RxDOS) the switch character (sometimes abbreviated switchar or switchchar) to be used is defined by a value returned from a organisation telephone call (INT 21h/AX=3700h). The default graphic symbol returned by this API is /, only tin can be changed to a hyphen-minus on the higher up-mentioned systems, except for under Datalight ROM-DOS and MS-DOS/PC DOS 5.0 and college, which always render / from this phone call (unless one of many available TSRs to reenable the SwitChar feature is loaded). In some of these systems (MS-DOS/PC DOS two.xx, DOS Plus two.1, DR-DOS vii.02 and higher, PTS-DOS, Embedded DOS, FreeDOS and RxDOS), the setting tin can also exist pre-configured by a SWITCHAR directive in CONFIG.SYS. General Software's Embedded DOS provides a SWITCH command for the same purpose, whereas 4DOS allows the setting to exist inverse via SETDOS /W:n.[13] Under DR-DOS, if the setting has been changed from /, the first directory separator \ in the display of the PROMPT parameter $Grand will change to a forward slash / (which is besides a valid directory separator in DOS, FlexOS, 4680 Bone, 4690 Os, Bone/2 and Windows) thereby serving every bit a visual clue to indicate the modify.[x] Also, the current setting is reflected too in the built-in help screens.[ten] Some versions of DR-DOS Command.COM also support a PROMPT token $/ to display the current setting. COMMAND.COM since DR-DOS seven.02 likewise provides a pseudo-environment variable named %/% to let portable batchjobs to exist written.[14] [15] Several external DR-DOS commands additionally support an environment variable %SWITCHAR% to override the arrangement setting.

Nonetheless, many programs are hardwired to use / just, rather than retrieving the switch setting earlier parsing command-line arguments. A very modest number, mainly ports from Unix-like systems, are programmed to accept "-" even if the switch graphic symbol is not set up to it (for example netstat and ping, supplied with Microsoft Windows, will have the /? option to list bachelor options, and withal the listing will specify the "-" convention).

Option conventions in Unix-similar systems [edit]

In Unix-like systems, the ASCII hyphen-minus begins options; the new (and GNU) convention is to use ii hyphens and then a word (eastward.g. --create) to identify the option's use while the former convention (and nonetheless available as an selection for frequently-used options) is to use 1 hyphen and then one alphabetic character (e.g., -c); if i hyphen is followed past two or more letters it may hateful two options are being specified, or it may mean the 2nd and subsequent letters are a parameter (such as filename or appointment) for the first pick.[16]

2 hyphen-minus characters without post-obit letters (--) may indicate that the remaining arguments should not exist treated as options, which is useful for example if a file name itself begins with a hyphen, or if further arguments are meant for an inner control (e.g., sudo). Double hyphen-minuses are besides sometimes used to prefix "long options" where more than descriptive option names are used. This is a common characteristic of GNU software. The getopt function and program, and the getopts control are usually used for parsing control-line options.

Unix command names, arguments and options are case-sensitive (except in a few examples, mainly where pop commands from other operating systems accept been ported to Unix).

Option conventions in other systems [edit]

FlexOS, 4680 OS and 4690 Os use -.

CP/M typically used [.

Conversational Monitor Arrangement (CMS) uses a single left parenthesis to separate options at the terminate of the control from the other arguments. For example, in the following command the options indicate that the target file should be replaced if it exists, and the date and time of the source file should be retained on the re-create: Copy source file a target file b (REPLACE OLDDATE

Data General's CLI under their RDOS, AOS, etc. operating systems, as well as the version of CLI that came with their Business Basic, uses just / as the switch character, is case-insensitive, and allows "local switches" on some arguments to control the way they are interpreted, such as MAC/U LIB/Southward A B C $LPT/L has the global option "U" to the macro assembler command to suspend user symbols, but two local switches, one to specify LIB should be skipped on pass 2 and the other to directly list to the printer, $LPT.

Built-in usage help [edit]

1 of the criticisms of a CLI is the lack of cues to the user as to the available actions.[ citation needed ] In contrast, GUIs usually inform the user of available actions with menus, icons, or other visual cues.[ commendation needed ] To overcome this limitation, many CLI programs display a brief summary of its valid parameters, typically when invoked with no arguments or one of ?, -?, -h, -H, /?, /h, /H, /Help, -help, or --help.[10] [17] [eighteen]

However, entering a program proper noun without parameters in the hope that it volition display usage help can exist hazardous, as programs and scripts for which command line arguments are optional volition execute without further detect.

Although desirable at least for the help parameter, programs may not support all option lead-in characters exemplified above. Under DOS, where the default command-line option character can exist changed from / to -, programs may query the SwitChar API in gild to determine the electric current setting. So, if a program is not hardwired to support them all, a user may demand to know the current setting even to be able to reliably request help. If the SwitChar has been changed to - and therefore the / grapheme is accepted every bit alternative path delimiter also at the DOS command line, programs may misinterpret options like /h or /H as paths rather than help parameters.[10] However, if given as first or only parameter, most DOS programs will, by convention, accept it as request for assist regardless of the electric current SwitChar setting.[10] [13]

In some cases, dissimilar levels of help tin be selected for a program. Some programs supporting this permit to give a verbosity level as an optional argument to the assistance parameter (as in /H:one, /H:2, etc.) or they give merely a short help on help parameters with question mark and a longer aid screen for the other help options.[19]

Depending on the program, additional or more than specific help on accepted parameters is sometimes bachelor past either providing the parameter in question equally an argument to the aid parameter or vice versa (as in /H:Westward or in /West:? (assuming /W would be another parameter supported past the program)).[20] [21] [18] [17] [19] [nb 1]

In a similar fashion to the assistance parameter, but much less common, some programs provide additional information virtually themselves (similar style, status, version, writer, license or contact data) when invoked with an "about" parameter like -!, /!, -almost, or --about.[17]

Since the ? and ! characters typically also serve other purposes at the command line, they may not be available in all scenarios, therefore, they should not be the just options to access the respective help information.

The terminate of the Help control output from RT-11SJ displayed on a VT100

If more detailed help is necessary than provided past a program'south built-in internal help, many systems support a dedicated external "help command " command (or similar), which accepts a command name as calling parameter and will invoke an external assistance system.

In the DR-DOS family, typing /? or /H at the COMMAND.COM prompt instead of a command itself will display a dynamically generated list of available internal commands;[10] 4DOS and NDOS support the same characteristic by typing ? at the prompt[13] (which is also accepted by newer versions of DR-DOS COMMAND.COM); internal commands can be individually disabled or reenabled via SETDOS /I.[thirteen] In addition to this, some newer versions of DR-DOS COMMAND.COM also accept a ?% command to display a list of bachelor built-in pseudo-surround variables. Besides their purpose as quick help reference this can be used in batchjobs to query the facilities of the underlying command-line processor.[x]

Command description syntax [edit]

Born usage assistance and human being pages commonly employ a modest syntax to describe the valid command form:[22] [23] [24] [nb 2]

  • angle brackets for required parameters: ping <hostname>
  • square brackets for optional parameters: mkdir [-p] <dirname>
  • ellipses for repeated items: cp <source1> [source2…] <dest>
  • vertical bars for choice of items: netstat {-t|-u}

Notice that these characters have different meanings than when used direct in the vanquish. Angle brackets may exist omitted when confusing the parameter name with a literal string is non likely.

The infinite character [edit]

In many areas of computing, but especially in the control line, the space character can cause bug as information technology has two distinct and incompatible functions: as office of a command or parameter, or as a parameter or proper name separator. Ambiguity can be prevented either by prohibiting embedded spaces in file and directory names in the first place (for case, past substituting them with underscores _), or past enclosing a name with embedded spaces between quote characters or using an escape character before the space, commonly a backslash (\). For example

Long path/Long plan name Parameter ane Parameter 2

is ambiguous (is "program name" role of the programme name, or two parameters?); however

Long_path/Long_program_name Parameter_one Parameter_two …,
LongPath/LongProgramName ParameterOne ParameterTwo …,
"Long path/Long program name" "Parameter one" "Parameter two"

and

Long\ path/Long\ plan\ proper name Parameter\ 1 Parameter\ ii

are not ambiguous. Unix-based operating systems minimize the utilise of embedded spaces to minimize the need for quotes. In Microsoft Windows, ane often has to utilize quotes because embedded spaces (such as in directory names) are common.

Control-line interpreter [edit]

Although near users recall of the shell as an interactive command interpreter, it is really a programming language in which each argument runs a command. Considering it must satisfy both the interactive and programming aspects of command execution, it is a strange language, shaped as much past history as by design.

The term command-line interpreter (CLI) is applied to computer programs designed to interpret a sequence of lines of text which may be entered by a user, read from a file or some other kind of data stream. The context of interpretation is usually one of a given operating arrangement or programming linguistic communication.

Command-line interpreters permit users to upshot various commands in a very efficient (and often terse) manner. This requires the user to know the names of the commands and their parameters, and the syntax of the linguistic communication that is interpreted.

The Unix #! mechanism and OS/ii EXTPROC command facilitate the passing of batch files to external processors. One can use these mechanisms to write specific command processors for dedicated uses, and process external data files which reside in batch files.

Many graphical interfaces, such as the Os/2 Presentation Director and early versions of Microsoft Windows use command-lines to call helper programs to open documents and programs. The commands are stored in the graphical shell[ description needed ] or in files like the registry or the OS/2 OS2USER.INI file.

Early history [edit]

The earliest computers did not support interactive input/output devices, often relying on sense switches and lights to communicate with the computer operator. This was adequate for batch systems that ran one program at a time, often with the programmer acting equally operator. This likewise had the advantage of low overhead, since lights and switches could be tested and set with i machine instruction. Later a single system console was added to allow the operator to communicate with the system.

From the 1960s onwards, user interaction with computers was primarily by means of command-line interfaces, initially on machines similar the Teletype Model 33 ASR, but then on early CRT-based figurer terminals such as the VT52.

All of these devices were purely text based, with no ability to display graphic or pictures.[nb 3] For business concern application programs, text-based menus were used, only for more general interaction the command line was the interface.

Effectually 1964 Louis Pouzin introduced the concept and the proper name shell in Multics, edifice on earlier, simpler facilities in the Uniform Fourth dimension-Sharing System (CTSS).[26] [ improve source needed ]

From the early 1970s the Unix operating system adapted the concept of a powerful command-line surround, and introduced the ability to pipe the output of one command in as input to another. Unix besides had the capability to relieve and re-run strings of commands equally "shell scripts" which acted like custom commands.

The control-line was also the main interface for the early home computers such as the Commodore PET, Apple Two and BBC Micro – near ever in the form of a Bones interpreter. When more powerful business concern oriented microcomputers arrived with CP/M and afterward DOS computers such as the IBM PC, the command-line began to borrow some of the syntax and features of the Unix shells such equally globbing and piping of output.

The command-line was first seriously challenged by the PARC GUI approach used in the 1983 Apple tree Lisa and the 1984 Apple tree Macintosh. A few computer users used GUIs such as GEOS and Windows 3.1 but the bulk of IBM PC users did not supervene upon their Command.COM shell with a GUI until Windows 95 was released in 1995.[27] [28]

Mod usage as an operating system shell [edit]

While most non-expert computer users now use a GUI about exclusively, more advanced users accept access to powerful command-line environments:

  • The default VAX/VMS control shell, using the DCL language, has been ported to Windows systems at to the lowest degree three times, including PC-DCL and Acceler8 DCL Lite. Unix control shells have been ported to VMS and DOS/Windows 95 and Windows NT types of operating systems.
  • COMMAND.COM is the command-line interpreter of MS-DOS, IBM PC DOS, and clones such equally DR-DOS, SISNE plus, PTS-DOS, ROM-DOS, and FreeDOS.
  • Windows Resource Kit and Windows Services for UNIX include Korn and the Bourne shells along with a Perl interpreter (Services for UNIX contains ActiveState ActivePerl in later versions and Interix for versions 1 and ii and a shell compiled past Microsoft)
  • IBM OS/2 (and derivatives such as eComStation and ArcaOS) has the cmd.exe processor. This copies the COMMAND.COM commands, with extensions to REXX.
  • cmd.exe is part of the Windows NT stream of operating systems.
  • All the same another cmd.exe is a stripped-down shell for Windows CE iii.0.
  • An MS-DOS type interpreter called PocketDOS has been ported to Windows CE machines; the about contempo release is almost identical to MS-DOS six.22 and tin can also run Windows ane, 2, and 3.0, QBasic and other development tools, 4NT and 4DOS. The latest release includes several shells, namely MS-DOS 6.22, PC DOS seven, DR DOS 3.xx, and others.
  • Windows users might utilise the CScript interface to alternate programs, from command-line. PowerShell provides a command-line interface, but its applets are non written in Beat script. Implementations of the Unix shell are besides bachelor equally part of the POSIX sub-system,[29] Cygwin, MKS Toolkit, UWIN, Hamilton C crush and other software packages. Available shells for these interoperability tools include csh, ksh, sh, Bash, rsh, tclsh and less unremarkably zsh, psh
  • Implementations of PHP have a shell for interactive use called php-cli.
  • Standard Tcl/Tk has two interactive shells, Tclsh and Wish, the latter being the GUI version.
  • Python, Ruby, Lua, XLNT, and other interpreters as well have command shells for interactive utilise.
  • FreeBSD uses tcsh as its default interactive shell for the superuser, and ash as default scripting shell.
  • Many Linux distributions accept the Bash implementation of the Unix shell.
  • Apple macOS and some Linux distributions use zsh. Previously, macOS used tcsh and Bash.
  • Embedded Linux (and other embedded Unix-similar) devices often use the Ash implementation of the Unix shell, as function of Busybox.
  • Android uses the mksh shell,[30] [31] which replaces a shell derived from ash[32] that was used in older Android versions, supplemented with commands from the dissever toolbox [33] binary.
  • Routers with Cisco IOS,[34] Junos[35] and many others are commonly configured from the command line.
  • The Plan 9 operating system uses the rc shell which is similar in pattern to the Bourne beat.

Scripting [edit]

Most command-line interpreters support scripting, to various extents. (They are, after all, interpreters of an interpreted programming language, admitting in many cases the language is unique to the particular command-line interpreter.) They will translate scripts (variously termed beat scripts or batch files) written in the linguistic communication that they translate. Some command-line interpreters also contain the interpreter engines of other languages, such equally REXX, in addition to their ain, allowing the executing of scripts, in those languages, straight within the command-line interpreter itself.

Conversely, scripting programming languages, in detail those with an eval function (such as REXX, Perl, Python, Reddish or Jython), can be used to implement control-line interpreters and filters. For a few operating systems, most notably DOS, such a command interpreter provides a more flexible command-line interface than the 1 supplied. In other cases, such a control interpreter can present a highly customised user interface employing the user interface and input/output facilities of the language.

Other command-line interfaces [edit]

The command line provides an interface between programs as well every bit the user. In this sense, a command line is an alternative to a dialog box. Editors and databases nowadays a command line, in which alternating command processors might run. On the other hand, one might have options on the command line, which opens a dialog box. The latest version of 'Take Command' has this feature. DBase used a dialog box to construct control lines, which could be further edited before use.

Programs similar BASIC, diskpart, Edlin, and QBASIC all provide command-line interfaces, some of which utilize the system shell. Basic is modeled on the default interface for eight-bit Intel computers. Calculators can exist run as control-line or dialog interfaces.

Emacs provides a command-line interface in the grade of its minibuffer. Commands and arguments can be entered using Emacs standard text editing support, and output is displayed in another buffer.

There are a number of text fashion games, like Adventure or King's Quest 1-three, which relied on the user typing commands at the bottom of the screen. One controls the graphic symbol by typing commands like 'get band' or 'look'. The program returns a text which describes how the character sees it, or makes the action happen. The text take chances The Hitchhiker's Guide to the Galaxy, a piece of interactive fiction based on Douglas Adam's book of the same name, is a teletype-style command-line game.

The nigh notable of these interfaces is the standard streams interface, which allows the output of i command to be passed to the input of another. Text files tin can serve either purpose too. This provides the interfaces of pipage, filters and redirection. Under Unix, devices are files too, so the normal type of file for the vanquish used for stdin,stdout and stderr is a tty device file.

Another command-line interface allows a shell plan to launch helper programs, either to launch documents or starting time a programme. The command is processed internally by the shell, and and then passed on to some other program to launch the certificate. The graphical interface of Windows and OS/2 rely heavily on command-lines passed through to other programs – console or graphical, which so commonly procedure the command line without presenting a user-panel.

Programs similar the Os/2 East editor and some other IBM editors, tin can procedure command-lines normally meant for the shell, the output being placed straight in the document window.

A spider web browser'south URL input field can be used as a command line. It tin can be used to "launch" web apps, admission browser configuration, every bit well every bit perform a search. Google, which has been called "the command line of the internet" will perform a domain-specific search when it detects search parameters in a known format.[36] This functionality is present whether the search is triggered from a browser field or on Google's website.

In that location are JavaScript libraries that allow to write control line applications in browser as standalone Spider web apps or as part of bigger application.[37] An example of such a website is the CLI interface to DuckDuckGo.[38] There are too Web-based SSH applications, that allow to requite access to server control line interface from a browser.

Many video games on the PC feature a control line interface frequently referred to every bit a panel. It is typically used by the game developers during development and by mod developers for debugging purposes every bit well every bit for cheating or skipping parts of the game.

Run across also [edit]

  • Comparison of command shells
  • List of command-line interpreters
  • Console application
  • Interpreter directive
  • Read-eval-print loop
  • Shell script
  • Run command
  • Graphical user interface § Comparing to other interfaces
  • In the Get-go... Was the Command Line

Notes [edit]

  1. ^ An example is the comprehensive internal help organization of the DR-DOS seven.03 DEBUG control, which tin can be invoked via ?? at the debug prompt (rather than only the default ? overview). Specific assist pages can be selected via ?n (where n is the number of the page). Additionally, help for specific commands can be displayed past specifying the command name after ?, f.e. ?D will invoke help for the various dump commands (similar D etc.). Some of these features were already supported by the DR DOS 3.41 SID86 and GEMSID.
  2. ^ Conventions for describing commands on DOS-similar operating systems. Notable deviation: The Windows Server 2003 R2 documentation uses italic letters for "Data that the user must supply", while the Server 2008 documentation uses bending brackets. Italics can not exist displayed by the internal "help" command while there is no problem with angle brackets.
  3. ^ With the exception of ASCII art.

References [edit]

  1. ^ "Unix Shells". Archived from the original on 2007-11-08. the notion of having a replaceable "command shell" rather than a "monitor" tightly integrated with the Bone kernel tends to be attributed to Multics.
  2. ^ a b "The Origin of the Shell". www.multicians.org . Retrieved 2017-04-12 .
  3. ^ Metz, Cade (2013-01-03). "Say Bonjour to the Internet'due south Long-Lost French Uncle". Wired . Retrieved 2017-07-31 .
  4. ^ Mazières, David (Fall 2004). "MULTICS - The First Seven Years". Advanced Operating Systems. Stanford Information science Department. Retrieved 2017-08-01 .
  5. ^ a b Jones, M. (2011-12-06). "Evolution of shells in Linux". developerWorks. IBM. Retrieved 2017-08-01 .
  6. ^ "GNU Fustigate Reference".
  7. ^ "Microsoft Windows Command Beat Overview".
  8. ^ SID Users Guide (PDF). Digital Enquiry. 1978. 595-2549. Archived (PDF) from the original on 2019-10-20. Retrieved 2020-02-06 . (4+69 pages)
  9. ^ SID-86 User's Guide for CP/Grand-86 (2 ed.). Digital Research. August 1982 [March 1982]. SID86UG.WS4. Archived from the original on 2019-10-20. Retrieved 2020-02-06 . [1] (NB. A retyped version of the manual by Emmanuel Roche with Q, SR, and Z commands added.)
  10. ^ a b c d due east f g h i j k Paul, Matthias R. (1997-07-30). NWDOS-TIPs – Tips & Tricks rund um Novell DOS vii, mit Blick auf undokumentierte Details, Bugs und Workarounds. MPDOSTIP. Release 157 (in German) (3 ed.). Archived from the original on 2017-09-10. Retrieved 2014-09-06 . (NB. NWDOSTIP.TXT is a comprehensive work on Novell DOS vii and OpenDOS 7.01, including the description of many undocumented features and internals. It is role of the author's notwithstanding larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)
  11. ^ Parker, Steve (2011). "Chapter 11: Choosing and using shells". Beat Scripting: Expert Recipes for Linux, Bash and more. Programmer to programmer. Indianapolis, USA: John Wiley & Sons. p. 262. ISBN978-111816632-1. The shell has 4 different command prompts, called PS1, P52, P53, and PS4. PS stands for Prompt Cord.
  12. ^ RISC Os 3 User Guide (PDF). Acorn Computers Limited. 1992-03-01. p. 125.
  13. ^ a b c d Brothers, Hardin; Rawson, Tom; Conn, Rex C.; Paul, Matthias R.; Dye, Charles Eastward.; Georgiev, Luchezar I. (2002-02-27). 4DOS viii.00 online help.
  14. ^ Paul, Matthias R. (1998-01-09). DELTREE.BAT R1.01 Extended file and directory delete. Caldera, Inc. Archived from the original on 2019-04-08. Retrieved 2019-04-08 .
  15. ^ DR-DOS 7.03 WHATSNEW.TXT — Changes from DR-DOS 7.02 to DR-DOS 7.03. Caldera, Inc. 1998-12-24. Archived from the original on 2019-04-08. Retrieved 2019-04-08 .
  16. ^ "Argument Syntax (The GNU C Library)". world wide web.gnu.org . Retrieved 2021-07-09 .
  17. ^ a b c Paul, Matthias R. (2002-05-13). "[fd-dev] mkeyb". freedos-dev. Archived from the original on 2018-09-ten. Retrieved 2018-09-10 . […] CPI /H […] CPI [@] [@] [/?|/Help[:topic]] [/!|/Nigh] […] [?|&] […] /?, /Help Display this assistance screen or specific help for a topic (+) […] /!, /Most Display the 'About' info screen […] /Cpifile (+) .CPI/.CP file proper noun <EGA.CPI>; extension: <.CPI>; CPI.EXE=StdIn […] /Report Report file name <''=StdOut>; extension: <.RPT> […] /Style (+) Export <0>-vi=BIN-raw/ROM/RAM/PSF0/i/SH/CHED; 7-12/xiii-eighteen/19-24=ASM-hex/december/bin/ip/il/p/fifty/mp/ml […] CPI /H:C […] Overview on codepage file parameter usage: […] CPI /H:S […] Overview on /Fashion parameters: […] ?, & Online edit manner (prompts for additional parameter input) […]
  18. ^ a b Paul, Matthias R. (2002-01-09). "SID86". Newsgroup: comp.os.cpm. Retrieved 2018-04-08 . […] Since the DR-DOS seven.03 DEBUG is however based on the erstwhile SID86.EXE, I advise to run DEBUG 1.51 and enter the extended assistance system with ?? from the debug prompt. This will give you eight screens total of syntax and characteristic help. Some of these features were as well supported by older issues. […]
  19. ^ a b Paul, Matthias R.; Frinke, Axel C. (2006-01-16). FreeKEYB - Advanced international DOS keyboard and panel driver (User Manual) (v7 preliminary ed.).
  20. ^ CCI Multiuser DOS 7.22 GOLD Online Documentation. Concurrent Controls, Inc. (CCI). 1997-02-ten. Assistance.HLP. (NB. The symbolic instruction debugger SID86 provides a short help screen on ? and comprehensive assist on ??.)
  21. ^ Paul, Matthias R. (1997-05-24) [1991]. DRDOSTIP.TXT – Tips und Tricks für DR DOS 3.41 - 5.0. MPDOSTIP (in German language) (47 ed.). Archived from the original on 2016-11-07. Retrieved 2016-xi-07 .
  22. ^ "The Open Group Base Specifications Issue vii, Chapter 12.ane Utility Argument Syntax". The Open up Group. 2008. Retrieved 2013-04-07 . human-pages(7)  – Linux Conventions and Miscellany Manual (NB. Conventions for describing commands on Unix-like operating systems.)
  23. ^ "Command shell overview". Windows Server 2003 Product Help. Microsoft. 2005-01-21. Retrieved 2013-04-07 .
  24. ^ "Command-Line Syntax Key". Windows Server 2008 R2 TechNet Library. Microsoft. 2010-01-25. Retrieved 2013-04-07 .
  25. ^ Kernighan, Brian W.; Pike, Rob (1984). The UNIX Programming Surround . Englewood Cliffs: Prentice-Hall. ISBN0-13-937699-2.
  26. ^ Pouzin, Louis. "The Origin of the Shell". Multicians.org . Retrieved 2013-09-22 .
  27. ^ "Remembering Windows 95'south launch 15 years after". 2010-08-24.
  28. ^ "A history of Windows". windows.microsoft.com. Archived from the original on 2015-03-01.
  29. ^ "Windows POSIX beat compatibility".
  30. ^ "master - platform/external/mksh - Git at Google". android.googlesource.com . Retrieved 2018-03-eighteen .
  31. ^ "Android adb shell - ash or ksh?". stackoverflow.com . Retrieved 2018-03-14 .
  32. ^ "Android sh source". GitHub. Archived from the original on 2012-12-17.
  33. ^ "Android toolbox source". GitHub.
  34. ^ "Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.2". Cisco. 2013-10-30. Using the Command-Line Interface. The Cisco IOS control-line interface (CLI) is the master user interface…
  35. ^ "Control-Line Interface Overview". www.juniper.net . Retrieved 2018-03-14 .
  36. ^ "Google strange goodness".
  37. ^ jQuery Terminal Emulator
  38. ^ DuckDuckGo TTY

External links [edit]

  • The Roots of DOS David Hunter, Softalk for the IBM Personal Computer March 1983. Archived at Patersontech.com since 2000.
  • Control-Line Reference: Microsoft TechNet Database "Command-Line Reference"

blackwoodmoratte.blogspot.com

Source: https://en.wikipedia.org/wiki/Command-line_interface