Exit (command)
{{Short description|Termination command of many command-line interpreters and scripting languages}}
{{lowercase title}}
{{Infobox software
| name = exit
| logo =
| screenshot = ReactOS-0.4.13 exit command 667x434.png
| screenshot size =
| caption = The ReactOS exit
command
| developer = Various open-source and commercial developers
| released =
| latest release version =
| latest release date =
| operating system = Cross-platform
| genre = Command
| license =
| website =
}}
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.
Implementations
Operating systems, shells, and scripting languages providing this command include Microsoft MSX-DOS version 2,[https://archive.org/details/MSXDOS2 MSX-DOS version 2] IBM OS/2,{{cite web |url=http://www.jatomes.com/Help/Os2Cmd.php#EXIT |title=JaTomes Help - OS/2 Commands |website=www.jatomes.com |url-status=dead |archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php |archive-date=2019-04-14}} DR FlexOS,{{cite web |url=http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |title=User Guide |website=www.bitsavers.org |access-date=2018-09-16 |archive-date=2018-09-14 |archive-url=https://web.archive.org/web/20180914132130/http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |url-status=dead}} HP MPE/iX,{{cite web |url=http://www.teamnaconsulting.com/compresources/pdfs/c01687363.pdf |title=MPE/iX Command Reference Manual |access-date=2023-08-05 |archive-date=2018-10-21 |archive-url=https://web.archive.org/web/20181021232213/http://www.teamnaconsulting.com/compresources/pdfs/c01687363.pdf |url-status=dead}} KolibriOS,{{cite web |url=http://wiki.kolibrios.org/wiki/Shell |title=Shell - KolibriOS wiki |website=wiki.kolibrios.org}} SymbOS,{{cite web |url=http://www.symbos.de/appinfo.htm?00025 |title=Data |website=www.symbos.de}} cmd.exe,{{cite web |url=https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc770929(v%3dws.11) |title=Exit3 |last=Archiveddocs |website=docs.microsoft.com}} sh, ksh, Perl, AWK, PHP, TCL, PowerShell, and others.
On MS-DOS, the command is available in versions 2 and later.{{cite book |author-last=Wolverton |author-first=Van |title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition |date=2003 |publisher=Microsoft Press |isbn=0-7356-1812-7}} DR DOS 6.0[https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf DR DOS 6.0 User Guide Optimisation and Configuration Tips] and Datalight ROM-DOS{{cite web |url=https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf |title=Datalight ROM-DOS User's Guide |website=www.datalight.com}} also include an implementation of the {{code|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.{{cite web |url=https://www.mathworks.com/help/matlab/ref/exit.html |title=Terminate MATLAB program (Same as quit) - MATLAB exit}}
See also
References
{{Reflist}}
Further reading
- {{cite book |last=Cooper |first=Jim |title=Special Edition Using MS-DOS 6.22, Third Edition |date=2001 |publisher=Que Publishing |isbn=978-0789725738}}
- {{cite book |last=Dyson |first=Peter |year=1995 |title=Mastering OS/2 Warp |publisher=Sybex |isbn=978-0782116632}}
- {{cite book |last=Barrett |first=Daniel J. |year=2012 |title=Macintosh Terminal Pocket Guide: Take Command of Your Mac |publisher=O'Reilly |isbn=978-1449328986}}
- {{cite book |last=Stanek |first=William R. |year=2008 |title=Windows Command-Line Administrator's Pocket Consultant, 2nd Edition |publisher=Microsoft Press |isbn=978-0735622623}}
External links
{{Wikibooks|Guide to Windows Commands}}
{{Wikibooks|Guide to Unix|Commands}}
- [http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#exit exit]: cause the shell to exit – Commands & Utilities Reference, The Single UNIX® Specification, Issue 7 from The Open Group
- [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/exit_2 exit | Microsoft Docs]
{{Unix commands}}
{{Windows commands}}
Category:IBM i Qshell commands
Category:Internal DOS commands
Category:Unix process- and task-management-related software
Category:Unix SUS2008 utilities
Category:Windows administration
{{Operating-system-stub}}