•Arnošt Havelka
Exit Terminal (exit)
Closing time.
Exit Command
When you're done being a hacker for the day, how do you leave? Clicking the 'X' works, but the pro way is to type exit. It's the polite way to say goodbye to the terminal.
Usage:exit
[/b]
[exitCode]
/b
Exits the current batch script instead of CMD.EXE.
exitCode
Specifies a numeric number (0 = success, non-zero = error).
Real-World Examples
Close the terminal window:
Command Prompt
C:\Users\User>exit
Exit a batch script with success code:
Command Prompt
C:\Users\User>exit /b 0
Exit with error code (for scripting):
Command Prompt
C:\Users\User>exit 1
Knowledge Check
1 / 2What is the command to close the terminal?