62-415: COMMAND.COM is the default command-line interpreter for MS-DOS , Windows 95 , Windows 98 and Windows Me . In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot ( init process ). As a shell, COMMAND.COM has two distinct modes of operation: interactive mode and batch mode . Internal commands are commands stored directly inside
124-513: A flag or switch ) modifies the operation of a command; the effect is determined by the command's program. Options follow the command name 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 of listing the DIR command's available options, whereas dir --help (in many versions of Unix) does require
186-507: 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. Operating system (OS) command-line interfaces are usually distinct programs supplied with
248-474: A pipeline where the output of one command becomes the input to the next command. One can modify the set of available commands by modifying which paths appear in the PATH environment variable. Under Unix, commands also need be marked as executable files. The directories in the path variable are searched in the order they are given. By re-ordering the path, one can run e.g. \OS2\MDOS\E.EXE instead of \OS2\E.EXE, when
310-409: A return code (a value between 0 and 255) to the calling program. Most programs have a certain convention for their return codes (for instance, 0 for a successful execution). If a program was invoked by COMMAND.COM, the internal IF command with its ERRORLEVEL conditional can be used to test on error conditions of the last invoked external program. Under COMMAND.COM, internal commands do not establish
372-438: A CLI, presenting their own prompt to the user and accepting command lines. Other programs support both a CLI and a GUI. In some cases, a GUI is simply a wrapper 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 functionality. For example, all features of MATLAB , a numerical analysis computer program, are available via
434-593: A COM style COMMAND.COM file which has a special signature at the start of the file [...] queried by the MS-DOS BIOS before it loads the shell, but not by the DR-DOS BIOS [...] COMMAND.COM would [...] check that it is running on the "correct" DOS version, so if you would load their COMMAND.COM under DR-DOS, you would receive a "Bad version" error message and their COMMAND.COM would exit, so DR-DOS would [...] display an error message "Bad or missing command interpreter" (if DR-DOS
496-453: 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 system macOS has been based on a Unix-like operating system called Darwin . On these computers, users can access a Unix-like command-line interface by running the terminal emulator program called Terminal , which
558-504: A command procedure or script which itself can be treated as a command. These advantages mean that a user must figure out a complex 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: where 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
620-480: A decimal number, or a hexadecimal number preceded by 0x.) [...] CommandSep = c (^): This is the character used to separate multiple commands on the same line. [...] Special Character Compatibility: If you use two or more of our products, or if you want to share aliases and batch files with users of different products, you need to be aware of the differences in three important characters: the Command Separator [...],
682-409: A new value. Batch files for COMMAND.COM can have four kinds of variables: Because DOS is a single-tasking operating system, piping is achieved by running commands sequentially, redirecting to and from a temporary file . COMMAND.COM makes no provision for redirecting the standard error channel. Generally, the command line length in interactive mode is limited to 126 characters. In MS-DOS 6.22 ,
SECTION 10
#1732852771191744-588: A pure GUI. This is typically the case with operating system command shells . CLIs are also used by systems with insufficient resources to support a graphical user interface. Some computer language systems (such as Python , Forth , LISP , Rexx , and many dialects of BASIC ) provide an interactive command-line mode to allow for rapid evaluation of code. 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 disabilities since
806-680: Is batch mode , which executes a predefined sequence of commands stored as a text file with the .BAT extension. Internal commands are commands stored directly inside the COMMAND.COM binary. Thus, they are always available but can only be executed directly from the command interpreter. All commands are executed after the ↵ Enter key is pressed at the end of the line. COMMAND.COM is not case-sensitive, meaning commands can be typed in any mixture of upper and lower case. Control structures are mostly used inside batch files, although they can also be used interactively. On exit, all external commands submit
868-504: Is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in Microsoft DOS and Windows . It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default, it has a large number of enhancements. 4OS2 and 4NT are similar products that replace cmd.exe in OS/2 and Windows NT respectively. 4DOS
930-449: Is a DOS program. Programs launched from COMMAND.COM are DOS programs that use the DOS API to communicate with the disk operating system. The compatible command processor under FreeDOS is sometimes also named FreeCom . As a shell, COMMAND.COM has two distinct modes of operation. The first is interactive mode , in which the user types commands which are then executed immediately. The second
992-509: Is active a program is typically invoked by typing its name followed by command-line arguments (if any). 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 named file.s . Some programming languages, such as C , C++ and Java , allow a program to interpret the command-line arguments by handling them as string parameters in
1054-413: Is bundled as Take Command Console. A light feature-reduced version of TCC is released as a free download. JP Software then released: This has been released from versions 9 to 12.1, corresponding to the underlying 4NT/TCC version. 4DOS features a number of enhancements compared to COMMAND.COM : Originally distributed as shareware , 4DOS has been later released as unsupported freeware . Currently,
1116-584: Is found in the Utilities sub-folder of the Applications folder, or by remotely logging into the machine using ssh . Z shell is the default shell for macOS; Bash, tcsh , and the KornShell are also provided. Before macOS Catalina , Bash was the default. 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
1178-512: Is included with ArcaOS . 4NT was first released as 4DOS for Windows NT (versions 1.x, 2.x), but became 4NT until the restructure after version 8. The program is a recompilation of 4OS2, and continues to have features of OS/2's command processor ( cmd.exe ), such as running REXX scripts, and EXTPROC support. A corresponding Take Command/32 exists for this, version 1 corresponding to 4NT 2.5. 4NT and Take Command/32 were released in both ANSI (Windows 9x) and Unicode (Windows NT) forms, with
1240-421: Is most often used as a command-line replacement for the following operating systems: Since Windows NT and Windows 2000 includes both COMMAND.COM and cmd.exe , 4DOS and 4NT and derivatives can both be installed. Earlier versions of 4OS2 can be run under Windows NT, and OS/2 can run the two DOS and Windows NT shells, all three can be used on Windows NT-type machines and OS/2 multiple boot machines. Among
1302-516: Is the grammar that all commands must follow. In the case of operating systems , DOS and Unix each define their own set of rules that all commands must follow. In the case of embedded systems , each vendor, such as Nortel , Juniper Networks or Cisco Systems , defines their own proprietary set of rules. These rules also dictate how a user navigates through the system of commands. The semantics define what sort of operations are possible, on what sort of data these operations can be performed, and how
SECTION 20
#17328527711911364-476: The main function . Other languages, such as Python , expose operating system specific API (functionality) through sys module , and in particular sys.argv for command-line arguments . In Unix-like operating systems , a single hyphen used in place of a file name is a special value specifying that a program should handle data coming from the standard input or send data to the standard output . A command-line option or simply option (also known as
1426-554: The ANSI version dropped at version 5. A new Win32 program Tabbed Command Interface (TCI), was released at the time of 4NT version 7. This program allowed one to attach (thereby reducing screen clutter) and detach tabbed consoles to a single window. This program requires Windows XP or later. A new version of Take Command extends the original Tabbed Command Interface, expanded with extra windows to allow input to be composed, to graphically navigate directories and files, and extra features. 4NT
1488-524: The CLI, whereas the MATLAB GUI exposes only a subset of features. In Colossal Cave Adventure from 1975, the user uses a CLI to enter one or two words to explore a cave system. The command-line interface evolved from a form of communication conducted by people over teleprinter (TTY) machines. Sometimes these involved sending an order or a confirmation using telex . Early computer systems often used teleprinter as
1550-426: The COMMAND.COM binary ; thus, they are always available, but can only be executed directly from the command interpreter. COMMAND.COM is the default command-line interpreter for MS-DOS , Windows 95 , Windows 98 and Windows Me . In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot ( init process ), hence being responsible for setting up
1612-590: The Escape Character [...], and the Parameter Character [...]. The default values of each of these characters in each product is shown in the following chart: [...] Product, Separator, Escape Parameter [...] 4DOS: ^, ↑, & [...] 4OS2, 4NT, Take Command: &, ^, $ [...] (The up-arrow [↑] represents the ASCII Ctrl-X character, numeric value 24.) [...] [...] all MS-DOS versions prior to Windows 95 [...] used
1674-507: The PC DOS COMMAND.COM works fine under DR-DOS [...] Paul, Matthias R. (2004-06-17). "Re: Random Lockups with DR-DOS 7.03" . FidoNet conference: ALT_DOS . Archived from the original on 2019-04-28 . Retrieved 2019-04-28 . Command-line interpreter A command-line interface ( CLI ) is a means of interacting with a computer program by inputting lines of text called command-lines . Command-line interfaces emerged in
1736-515: The PC's serial ports . These were typically used to interface an organization's new PC's with their existing mini- or mainframe computers, or to connect PC to PC. Some of these PCs were running Bulletin Board System software. Early operating system 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
1798-492: The Windows CMD.EXE programs, the latter groups being based heavily on DEC's RSX-11 and RSTS CLIs. Under 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
1860-437: The character used for separating multiple commands on the same line. The default is the caret [^]. You cannot use any of the redirection characters [<>|], or the blank, tab, comma, or equal sign as the command separator. The command separator is saved by SETLOCAL and restored by ENDLOCAL. This example changes the separator to a tilde [~]: C:\> SETDOS /C~ (You can specify either the character itself, or its ASCII code as
1922-423: The command In zsh the $ RPROMPT variable controls an optional prompt on the right-hand side of the display. 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 . One can also access
COMMAND.COM - Misplaced Pages Continue
1984-517: The command line as you wish, as long as the total length of the command line does not exceed 511 characters. You can use multiple commands in aliases and batch files as well as at the command line. If you don't like using the default command separator, you can pick another character using the SETDOS /C command or the CommandSep directive in 4DOS.INI . [...] SETDOS /C: (Compound character) This option sets
2046-660: The command line interface as the primary user interface replaced by the Graphical User Interface . The command line remained available as an alternative user interface, often used by system 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-source packages for Windows that offer
2108-451: The command line length in interactive mode is limited to 127 characters. [...] Multiple Commands: You can type several commands on the same command line, separated by a caret [^]. For example, if you know you want to copy all of your .TXT files to drive A: and then run CHKDSK to be sure that drive A's file structure is in good shape, you could enter the following command: C:\> COPY *.TXT A: ^ CHKDSK A: You may put as many commands on
2170-399: The command should act. The > in the third example is a redirection operator , telling the command-line interpreter to send the output of the command not to its own standard output (the screen) but to the named file. This will overwrite the file. Using >> will redirect the output and append it to the file. Another redirection operator is the vertical bar ( | ), which creates
2232-431: The commands and responses can be displayed using refreshable Braille displays . The general pattern of a command line interface is: In this format, the delimiters between command-line elements are whitespace characters and the end-of-line delimiter is the newline delimiter. This is a widely used (but not universal) convention. A CLI can generally be considered as consisting of syntax and semantics . The syntax
2294-466: The commands. Alternatives to CLIs include GUIs (most notably desktop metaphors with a mouse pointer , such as Microsoft Windows ), text-based user interface menus (such as DOS Shell and IBM AIX SMIT ), and keyboard shortcuts . 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
2356-410: The corresponding text mode versions. There was a graphical program Take Command/16 , for Windows 3.1. 4OS2 is a similar replacement for IBM's OS/2 command interpreter. This was first released at the same time as 4DOS version 4, and has a similar feature set. Like 4DOS, this is released as open source. It appeared in the feature set of 2011's eComStation 2.10, in the freeware os2free project, and
2418-407: The current time, user, shell number or working directory) 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. On some systems, special tokens in the definition of the prompt can be used to cause external programs to be called by the command-line interpreter while displaying
2480-422: The default is the opposite. Renaming of the executables also works: people often rename their favourite editor to EDIT, for example. The command line allows one to restrict available commands, such as access to advanced internal commands. The Windows CMD.EXE does this. Often, shareware programs will limit the range of commands, including printing a command 'your administrator has disabled running batch files' from
2542-494: The features that are commonly considered to produce structured programs. The Bourne shell led to the development of the KornShell (ksh), Almquist shell (ash), and the popular Bourne-again shell (or Bash). Early microcomputers themselves were based on a command-line interface such as CP/M , DOS or AppleSoft BASIC . During the 1980s and 1990s, the introduction of the Apple Macintosh and of Microsoft Windows on PCs saw
COMMAND.COM - Misplaced Pages Continue
2604-500: The first Multics shell was developed by Glenda Schroeder . The first Unix shell , the V6 shell , was developed by Ken Thompson in 1971 at Bell Labs and was modeled after Schroeder's Multics shell. The Bourne shell was introduced in 1977 as a replacement for the V6 shell. Although it is used as an interactive command interpreter, it was also intended as a scripting language and contains most of
2666-412: The grammar represents these operations and data—the symbolic meaning in the syntax. 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 learn anything, as well as to enable re-use of scripts. A simple CLI will display a prompt, accept a command line typed by
2728-501: The interface mode. At this point, commands from the system mode may not be accessible until the user exits the interface mode and enters the system 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. It literally prompts the user to take action. A prompt usually ends with one of the characters $ , % , # , : , > or - and often includes other information, such as
2790-516: The many commands, statements and functions in 4DOS and lacking in DOS/Windows 95–98 COMMAND.COM are reading keyboard input and a simpler method of working with colors of screen and text. The default file extension for 4DOS scripts is .btm. A graphical version of 4DOS, 4OS2, and 4NT, called Take Command , was released with a feature set corresponding to version 4DOS 5.5, 4OS2, and 4NT 2.5 and updated after this. Development on this line stopped with
2852-598: The means of interaction with an operator. The mechanical teleprinter was replaced by a "glass tty" , a keyboard and screen emulating the teleprinter. "Smart" terminals permitted additional functions, such as cursor movement over the entire screen, or local editing of data on the terminal for transmission to the computer. As the microcomputer revolution replaced the traditional – minicomputer + terminals – time sharing architecture, hardware terminals were replaced by terminal emulators — PC software that interpreted terminal signals sent through
2914-706: The mid-1960s, on computer terminals , as an interactive and more user-friendly alternative to the non-interactive interface available with punched cards . Today, most computer users rely on graphical user interfaces ("GUIs") instead of CLIs. However, many programs and operating system utilities lack GUIs, and are intended to be used through CLIs. Knowledge of CLIs is also useful for writing scripts . Programs that have CLIs are generally easy to automate via scripting, since command-lines, being mere lines of text, are easy to specify in code. CLIs are made possible by command-line interpreters or command-line processors , which are programs that read command-lines and carry out
2976-457: The newer C:\> style, unless used on floppy drives A: or B:; on those systems PROMPT $ N$ G can be used to override the automatic default and explicitly switch to the older style. Many Unix systems feature the $ PS1 variable (Prompt String 1), although other variables also may affect the prompt (depending on the shell used). In the Bash shell, a prompt of the form: could be set by issuing
3038-460: 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 Nushell , 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 ' COMMAND.COM , as well as the OS/2 and
3100-469: The option to be preceded by at least one space (and is case-sensitive). The format of options varies widely between operating systems. In most cases the syntax is by convention rather than an operating system requirement; the entire command line is simply a string passed to a program, which can process it in any way the programmer wants, so long as the interpreter can tell where the command name ends and its arguments and options begin. 4DOS.INI 4DOS
3162-422: The options easier to access. Automation of repetitive tasks is simplified by line editing and history mechanisms for storing frequently used sequences; this may extend to a scripting language that can take parameters and variable options. A command-line history can be kept, allowing review or repetition of commands. A command-line system may require paper or online manuals for the user's reference, although often
SECTION 50
#17328527711913224-464: The path of the current working directory and the hostname . On many Unix and derivative systems , the prompt commonly ends in $ or % if the user is a normal user, but in # if the user is a superuser ("root" in Unix terminology). End-users can often modify prompts. Depending on the environment, they may include colors, special characters, and other elements (like variables and functions for
3286-428: The prompt. Some CLIs, such as those in network routers , have a hierarchy 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 series of sub-modes. For example, if the CLI had two modes called interface and system , the user might use the command interface to enter
3348-538: The prompt. In DOS' COMMAND.COM and in Windows NT's cmd.exe users can modify the prompt by issuing a PROMPT command or by directly changing the value of the corresponding %PROMPT% environment variable . 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 , although on some systems this produces
3410-458: The same commands from other command lines (such as the BBC BASIC command line), by preceding the command with a * . A command-line argument 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 alter the operation of the program. When a command processor
3472-512: The source code is available under a modified MIT License but it "may not be used in any commercial product without written permission from Rex C. Conn" and "may not be compiled for use on any operating system other than FreeDOS " – so does not qualify as open source as defined by Open Source Initiative . The last update by JP Software was version 7.50.130, released in August 2004. During its 15-year history, 4DOS underwent numerous updates; here are
3534-494: The system by running the AUTOEXEC.BAT configuration file, and being the ancestor of all processes. COMMAND.COM's successor on OS/2 and Windows NT systems is cmd.exe , although COMMAND.COM is available in virtual DOS machines on IA-32 versions of those operating systems as well. The COMMAND.COM filename was also used by Disk Control Program (DCP), an MS-DOS derivative by the former East German VEB Robotron . COMMAND.COM
3596-451: The user terminated by the Enter key , then execute the specified command and provide textual display of results or error messages. 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
3658-410: 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
3720-605: The user-interface, including fully graphically oriented ones. For example, the default Windows GUI is a shell program named EXPLORER.EXE , as defined in the SHELL=EXPLORER.EXE line in the WIN.INI configuration file. These programs are shells, but not CLIs. Application programs (as opposed to operating systems) may also have command-line interfaces. An application program may support none, any, or all of these three major types of command-line interface mechanisms: Some applications support
3782-559: Was part of the Multics time-sharing operating system . In 1964, MIT Computation Center staff member Louis Pouzin developed the RUNCOM tool for executing command scripts while allowing argument substitution. Pouzin coined the term shell to describe the technique of using commands like a programming language, and wrote a paper about how to implement the idea in the Multics operating system. Pouzin returned to his native France in 1965, and
SECTION 60
#17328527711913844-605: Was trying to load the SHELL= command processor after having finished CONFIG.SYS processing). In this case, you could enter the path to a valid DR-DOS COMMAND.COM (C:\DRDOS\COMMAND.COM) and everything was fine. Now, things have changed since MS-DOS 7.0 [...] COMMAND.COM has internally become an EXE style file, so there is no magic [...] signature [...] to check [...] thus no way for DR-DOS to rule out an incompatible COMMAND.COM. Further, their COMMAND.COM no longer does any version checks, but [...] does not work under DR-DOS [...] just crashes [...]
#190809