Exit (command)

Last updated
exit
Developer(s) Various open-source and commercial developers
Operating system Cross-platform
Type Command

In computing, exit is a command used in many operating system command-line shells and scripting languages.

Contents

The command causes the shell or program to terminate. If performed within an interactive command shell, the user is logged out of their current session, and/or user's current console or terminal connection is disconnected. Typically an optional exit code can be specified, which is typically a simple integer value that is then returned to the parent process.

Implementations

Operating systems, shells and scripting languages providing this command include Microsoft MSX-DOS version 2, [1] IBM OS/2, [2] DR FlexOS, [3] HP MPE/iX, [4] KolibriOS, [5] SymbOS, [6] cmd.exe, [7] sh, ksh, Perl, AWK, PHP, TCL, PowerShell and others.

On MS-DOS, the command is available in versions 2 and later. [8] DR DOS 6.0 [9] and Datalight ROM-DOS [10] also include an implementation of the exit command. It is also available in the open source MS-DOS emulator DOSBox.

The numerical computing environment MATLAB includes an exit function with similar functionality. [11]

See also

Related Research Articles

cd (command) Computer command in various operating systems

The cd command, also known as chdir, is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.

dir (command) Directory information command on various operating systems

In computing, dir (directory) is a command in various computer operating systems used for computer file and directory listing. It is one of the basic commands to help navigate the file system. The command is usually implemented as an internal command in the command-line interpreter (shell). On some systems, a more graphical representation of the directory structure can be displayed using the tree command.

mkdir Directory creation command on various operating systems

The mkdir command in the Unix, DOS, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory. It is also available in the EFI shell and in the PHP scripting language. In DOS, OS/2, Windows and ReactOS, the command is often abbreviated to md.

pwd Directory information command on various operating systems

In Unix-like and some other operating systems, the pwd command writes the full pathname of the current working directory to the standard output.

In computing, rmdir is a command which will remove an empty directory on various operating systems.

In computing, touch is a command used to update the access date and/or modification date of a computer file or directory. It is included in Unix and Unix-like operating systems, TSC's FLEX, Digital Research/Novell DR DOS, the AROS shell, the Microware OS-9 shell, and ReactOS. The command is also available for FreeDOS and Microsoft Windows.

In computing, echo is a command that outputs the strings that are passed to it as arguments. It is a command available in various operating system shells and typically used in shell scripts and batch files to output status text to the screen or a computer file, or as a source part of a pipeline.

more (command) Terminal pager available on various operating systems

In computing, more is a command to view the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and ReactOS. Programs of this sort are called pagers. more is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.

In computing, sleep is a command in Unix, Unix-like and other operating systems that suspends program execution for a specified time.

tree (command) Shell command in various operating systems

In computing, tree is a recursive directory listing command or program that produces a depth-indented listing of files. Originating in PC- and MS-DOS, it is found in Digital Research FlexOS, IBM/Toshiba 4690 OS, PTS-DOS, FreeDOS, IBM OS/2, Microsoft Windows, and ReactOS. A version for Unix and Unix-like systems is also available.

<span class="mw-page-title-main">ATTRIB</span>

In computing, ATTRIB is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS that allows the user to change various characteristics, or "attributes" of a computer file or directory. The command is also available in the EFI shell.

del (command) Command in various operating systems

In computing, del is a command in command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS, NDOS, 4OS2, 4NT and Windows PowerShell. It is used to delete one or more files or directories from a file system.

ver (command) Command in many command-line interpreters

In computing, ver is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe and 4DOS/4NT. It prints the name and version of the operating system, the command shell, or in some implementations the version of other commands. It is roughly equivalent to the Unix command uname.

find (Windows)

In computing, find is a command in the command-line interpreters (shells) of a number of operating systems. It is used to search for a specific text string in a file or files. The command sends the specified lines to the standard output device.

help (command) Command in various command line shells

In computing, help is a command in various command line shells such as COMMAND.COM, cmd.exe, Bash, qshell, 4DOS/4NT, Windows PowerShell, Singularity shell, Python, MATLAB and GNU Octave. It provides online information about available commands and the shell environment.

copy (command)

In computing, copy is a command in various operating systems. The command copies computer files from one directory to another.

format (command)

In computing, format, a command-line utility that carries out disk formatting. It is a component of various operating systems, including 86-DOS, MS-DOS, IBM PC DOS and OS/2, Microsoft Windows and ReactOS.

In computing, diskcopy is a command used on a number of operating systems for copying the complete contents of a diskette to another diskette.

In computing, diskcomp is a command used for comparing the complete contents of a floppy disk to another one.

The command-line tool exe2bin is a post-compilation utility program available on MS-DOS and other operating systems.

References

  1. MSX-DOS version 2
  2. "JaTomes Help - OS/2 Commands". www.jatomes.com. Archived from the original on 2019-04-14.
  3. "User Guide" (PDF). www.bitsavers.org. Archived from the original (PDF) on 2018-09-14. Retrieved 2018-09-16.
  4. "MPE/iX Command Reference Manual" (PDF). Archived from the original (PDF) on 2018-10-21. Retrieved 2023-08-05.
  5. "Shell - KolibriOS wiki". wiki.kolibrios.org.
  6. "Data". www.symbos.de.
  7. Archiveddocs. "Exit3". docs.microsoft.com.
  8. Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN   0-7356-1812-7.
  9. DR DOS 6.0 User Guide Optimisation and Configuration Tips
  10. "Datalight ROM-DOS User's Guide" (PDF). www.datalight.com.
  11. "Terminate MATLAB program (Same as quit) - MATLAB exit".

Further reading