Exit command in Windows
The exit command exits the Cmd.exe program (command interpreter) or the current batch script. To learn how to use this command, please see the example below.
Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.
The exit command exits the Cmd.exe program (command interpreter) or the current batch script. To learn how to use this command, please see the example below.
The exit command is an internal command and is available in all versions of MS-DOS below Microsoft:
- Windows 95
- Windows 98
- Windows ME
- Windows NT
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
Syntax of exit command
exit [/b] []
Parameters
The Description / b parameter exits the current batch script instead of exiting Cmd.exe. If done from outside a batch script, it will exit Cmd.exe. exitCode Specifies a number. If the / b parameter is specified, the environment variable ERRORLEVEL is set to that number. If you are exiting Cmd.exe, then the process exit code will be set to that number. /? Show help at the command prompt.For example
To close the Cmd.exe command interpreter, enter:
exit
- When in another command interpreter, exit will exit the new command interpreter and return to the original command interpreter.
- When you import DOS from Windows, the exit command will return you to Windows.
- If in the restore panel, the exit command will exit the restore panel and restart the computer.
See more:
- Order bitsadmin getnotifycmdline, getnotifyflags, getnotifyinterface
- Bitsadmin getmodificationtime and bitsadmin getnoprogresstimeout command
- Bitsadmin getfilestransferred and bitsadmin commands getminretrydelay
3.5 ★ | 2 Vote
You should read it
- 8 methods to exit Vim in Linux
- Sub-commands in the nslookup Windows command (Part 1)
- The exit () function in C
- Del command in Windows
- Run remote commands on Cisco routers from the computer
- How to exit full screen mode on Windows
- MS Access 2003 - Lesson 4: Exit Access
- How to Exit Safe Mode
- Set command in Windows
- Cmd command in Windows
- Use array in Shell
- How to log out of your Google account on devices
Maybe you are interested
How to Enable and Disable Tabs in File Explorer on Windows 11
5 macOS Sequoia Features Not Available on Windows 11
Why does Windows operating system have such a bad reputation?
Quickly fix Unmountable Boot Volume error on Windows 10/11
15 safe software and application download websites for Windows
How to Fix Clipboard History Error in Windows 11 Latest Update