•Arnošt Havelka
Exit Terminal (exit)
Closing time.
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.
Try the command
Run the command to close the terminal.
Build the command
exit
exitCodeSpecifies a numeric number (0 = success, non-zero = error).
Terminal
C:\Users\User>exit /b 0
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?
References
These documentation links provide authoritative details for the commands used in this article.