Command Prompt is a powerful built-in Windows utility used to execute commands, troubleshoot system issues, manage files, and perform administrative tasks. Many advanced users and administrators rely on it for running scripts, repairing system components, and accessing various system tools.
However, sometimes Command Prompt may fail to open, crash immediately, show a blank window, or stop responding. In some cases, it may display errors or close automatically when launched. These issues are usually caused by corrupted system files, incorrect environment variables, malware interference, or Windows configuration problems.
If Command Prompt is not working in Windows 11, follow the troubleshooting steps below.
How to Fix Command Prompt Not Working in Windows 11
Work through the following methods in order. After completing each step, try opening Command Prompt again.
1. Restart Your PC
Temporary system glitches may prevent Command Prompt from launching properly.
- Close all running applications.
- Press Windows + X.
- Select Shut down or sign out > Restart.
- After restarting, search for Command Prompt and try opening it again.
Restarting refreshes system processes and resolves temporary conflicts.
2. Open Command Prompt Using Run
Sometimes Command Prompt may not open through the Start menu.
- Press Windows + R.
- Type: cmd
- Press Enter.
This launches Command Prompt directly.
3. Run Command Prompt as Administrator
Permission issues may prevent the utility from running.
- Press Windows + S and search for Command Prompt.
- Right-click Command Prompt.
- Select Run as administrator.
If the problem was related to permissions, the tool should now open correctly.
4. Check for Corrupted System Files (SFC Scan)
Corrupted system files may cause built-in utilities to malfunction.
- Press Windows + S and search for Windows Terminal or PowerShell.
- Right-click it and select Run as administrator.
- Enter the following command: sfc /scannow
- Press Enter and wait for the scan to complete.
- Restart your PC.
Windows will repair corrupted system files automatically.
5. Run DISM Scan
If the SFC scan does not fix the issue:
- Open PowerShell or Windows Terminal as administrator.
- Run the following command: DISM /Online /Cleanup-Image /RestoreHealth
- Wait for the process to complete.
- Restart your PC.
This repairs deeper Windows image corruption.
6. Check Environment Variables
Incorrect system variables may prevent Command Prompt from launching.
- Press Windows + S and search for Edit the system environment variables.
- Click Environment Variables.
- Under System variables, locate Path.
- Ensure the following entry exists: C:\Windows\System32
- If missing, add it and click OK.
- Restart your PC.
Correct environment variables ensure Windows can locate system tools.
7. Scan for Malware
Malicious software may disable system utilities.
- Open Windows Security.
- Go to Virus & threat protection.
- Click Quick scan or Full scan.
- Remove any detected threats.
- Restart your PC.
Malware removal may restore Command Prompt functionality.
8. Create a New User Account
A corrupted user profile may cause system utilities to malfunction.
- Press Windows + I.
- Go to Accounts > Other users.
- Click Add account.
- Select I don’t have this person’s sign-in information.
- Choose Add a user without a Microsoft account.
- Create a new local user account.
- Sign in with the new account and test Command Prompt.
If it works in the new account, the original profile may be corrupted.
9. Update Windows
Outdated system builds may cause problems with built-in tools.
- Press Windows + I.
- Go to Windows Update.
- Click Check for updates.
- Install available updates.
- Restart your PC.
Updates often include fixes for system utilities.
Conclusion
If Command Prompt is not working in Windows 11, the issue is usually caused by system file corruption, incorrect environment variables, malware interference, or profile-related problems. In most cases, running an SFC scan or repairing the Windows image using DISM resolves the issue quickly.
By following the troubleshooting steps above, you should be able to restore Command Prompt functionality and continue using command-line tools normally on your Windows 11 system. If the problem persists, creating a new user profile or updating Windows may help resolve deeper configuration issues.