HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

exit — Quit the current CMD instance or the current batch file. More information: <https://learn.microsoft.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecurrentcommandexitclicmdquitinstance
windows

Problem

How to use the exit command: Quit the current CMD instance or the current batch file. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/exit>.

Solution

exit — Quit the current CMD instance or the current batch file. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/exit>.

Quit the current CMD instance:
exit


Quit the current [b]atch script:
exit /b


Quit using a specific exit code:
exit {{2}}

Code Snippets

Quit the current CMD instance

exit

Quit the current [b]atch script

exit /b

Quit using a specific exit code

exit {{2}}

Context

tldr-pages: windows/exit

Revisions (0)

No revisions yet.