Exit (command)
Termination command of many command-line interpreters and scripting languages

In computing, exit is a command used in many operating system command-line shells and scripting languages.
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.
01Implementations
Operating systems, shells, and scripting languages providing this command include Microsoft MSX-DOS version 2, IBM OS/2, DR FlexOS, HP MPE/iX, KolibriOS, SymbOS, cmd.exe, sh, ksh, Perl, AWK, PHP, TCL, PowerShell, and others.
On MS-DOS, the command is available in versions 2 and later. DR DOS 6.0 and Datalight ROM-DOS 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.
Sources and credits
This article is adapted from the Wikipedia article “Exit (command)”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Images, from Wikimedia Commons:
- ReactOS-0.4.13 exit command 667x434.png by Ghettoblaster, Public domain
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.