Learn two simple ways of closing a Command Prompt window in Windows.
How to close Command Prompt in Windows
Follow these two methods to quickly exit any open Command Prompt window.
Method 1: Using the exit command
- Type exit in the console.
- Press Enter; the window will close.
Method 2: Using the X window control button
- Locate the three window control buttons in the top-right corner of the Command Prompt window.
- Click the X button to close it. On Windows 10, the button appears white until you hover your pointer over it.
If you need to reopen Command Prompt after closing it, press Windows key + R, type cmd, and hit Enter. This quickly launches a new window for your next task.
Regularly closing unused Command Prompt windows helps free up system resources and keeps your desktop organized. Consider pinning Command Prompt to your taskbar for even quicker access in the future. You can also explore PowerShell as a more powerful alternative for advanced command-line work.




