The Command Prompt isn’t opening on your Windows PC? If you can’t access it at all, try these immediate steps: a simple system restart often resolves locked-down sessions; if that fails, check for blocked permissions or corrupted files. Start with the basic fixes, then escalate to deeper troubleshooting. If you’re stuck in a loop where CMD won’t launch but other apps work, a forced reboot or account recovery may be needed.
What You'll Need
- Admin rights (to run Command Prompt as Administrator)
- Windows installed (no third-party antivirus blocking CMD unless explicitly disabled)
- Windows 10/11, Mac, or Linux (methods vary slightly by OS)
- A file explorer window open (to navigate to CMD shortcuts)
Step-by-Step
-
Restart Your PC (fastest fix). Hold the power button for 10 seconds to force a restart. Wait for the system to fully reboot, then try opening Command Prompt again. If it still won’t launch, move to Step 2.
Why it works: Windows 10/11 occasionally locks CMD in a “low disk space” or “service crash” state, which a reboot clears. Test this first—it’s the most reliable non-destructive fix.
-
Open Command Prompt as an Administrator (if CMD appears but shows "Access Denied").
- Press Win + X and select Terminal (Admin) from the menu. If this works, CMD is blocked by permissions—try Step 5 to reset them.
- Alternatively, right-click the Start menu, search for "cmd", then right-click the Command Prompt app and choose Run as administrator from the shortcut menu.
Key tip: If the admin prompt asks for your password, enter it. If you get a "The system cannot find the path specified" error, proceed to Step 4.
-
Check for Windows Update Errors (if CMD was recently updated).
- Press Win + I > Update & Security > Troubleshoot. Select Windows Update and run the troubleshooter.
- If prompted, restart after the troubleshooter finishes.
Why it fails: A corrupted Windows Update cache can break CMD shortcuts. This step forces Windows to re-download critical files without deleting your data.
-
Manually Locate and Launch CMD (if CMD shortcuts are missing from the Start menu).
- Open File Explorer (Win + E) and navigate to:
C:\Windows\System32 - Look for a file named
cmd.exe. Double-click it—the file should appear regardless of permissions. - If you see a prompt like "This file was created for Windows 11", right-click the file > Run with compatibility settings > Select this program for all users > Windows 10 (or earlier).
If this doesn’t work: The issue may be a missing CMD shortcut. Try creating a new shortcut:
- Right-click desktop > New > Shortcut.
- Enter
cmd.exein the location field, click Next, and name it "Command Prompt."
- Open File Explorer (Win + E) and navigate to:
-
Reset CMD Permissions (if CMD is blocked by Windows Security).
- Press Win + S, type
cmd, right-click the app > Properties. - Under Compatibility, check Run this program as an administrator and Disable full UAC protection for this program.
- Click Apply > OK. Restart CMD by right-clicking its shortcut and selecting Run as administrator again.
Note: Disabling UAC is temporary—Windows will prompt you again the next time CMD launches. If CMD still won’t open, proceed to Step 6.
- Press Win + S, type
-
Delete the CMD Shortcut and Recreate It (if the shortcut is corrupted).
- Find your Command Prompt shortcut (on the Start menu or desktop) and right-click > Delete.
- Restart CMD by searching for it normally (without admin rights). The app should launch unless Step 2 or Step 5 also failed.
If CMD still won’t open: The issue is deeper—move to Step 7.
-
Reset Windows Search or Run Command (if CMD appears but won’t launch when searched for).
- Open Task Manager (Ctrl + Shift + Esc) and end all processes for explorer.exe (the Windows shell).
- Wait 5 seconds, then restart Windows Explorer by searching for
explorer.exeand right-clicking it > Restart.
Why this works: A corrupted explorer.exe (Windows shell) can prevent CMD from launching when searched for via the Start menu. This forces a clean restart.
If That Did Not Work
If none of the above steps resolved the issue, you likely have a deeper system problem. Try these advanced fixes, in order:
-
Reset CMD via Registry Editor (use only if you’re comfortable with commands).
- Press Win + R, type
regedit, and press Enter. Back up your registry by copying the path to a notepad file first.C:\Users\[YourUser]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools - Delete the Command Prompt folder entirely. Restart your PC.
Warning: This deletes custom CMD shortcuts. Test the backup before proceeding.
- Press Win + R, type
-
Reinstall CMD via Windows Features.
- Open Control Panel > Programs > Turn Windows features on or off
- Uncheck Windows Terminal (if present) and Windows Subsystem for Linux (if installed). Reboot.
- Search for
cmdin the Start menu. If CMD still won’t open, the issue is likely a missing file.
-
Use Safe Mode to Reset Default CMD (only for Windows 10/11).
- Restart your PC and hold Shift while clicking Restart on the login screen.
- Select Troubleshoot > Advanced options > Startup Settings > Restart.
- Press 5 or F5 to boot into Safe Mode with networking.
- Open Command Prompt as Administrator and run:
cd /d %windir%\system32copy /y cmd.exe cmd_old.execopy /y cmd_old.exe cmd.exe - Reboot normally.
Note: This swaps the default CMD with a backup version. If CMD still fails, the original file is corrupted.
If you don’t have a backup: Reinstall Windows (use a clean USB) or contact Microsoft Support.
Common Mistakes
- Assuming CMD is broken: First check if you have admin rights or if CMD is blocked by security software. Many users miss these steps and assume the entire system is faulty.
- Restarting too many services: Force-quitting explorer.exe or ending CMD processes can cause instability. Only restart critical services if the issue persists after basic fixes.
- Disabling UAC permanently: The "Disable full UAC protection" setting in Step 5 is temporary. Windows will re-prompt you the next time CMD launches, so this is a workaround, not a solution.
- Ignoring permission errors: If CMD shows "Access Denied," always open it as Administrator or manually locate the executable file (Step 3).
Tips
- Use the CMD icon: If CMD appears in the file explorer, double-clicking it works even if the Start menu shortcut fails. Navigate to
C:\Windows\System32\cmd.exeand run it directly. - Avoid third-party tools: Apps like "Fix CMD" or "Quick CMD" are untrusted and may install malware. Stick to Windows-native fixes.
- Check for disk errors: If CMD works but gives "Access Denied" errors, run:
chkdsk /fin an elevated CMD session to scan and repair disk corruption. - Create a shortcut with compatibility settings: Right-click CMD > Properties > Compatibility > Select this program for all users > Check "Disable full UAC protection."
- Use PowerShell in emergencies: If CMD is completely unreachable, open PowerShell as Admin and run:
Start-Process cmd -Verb RunAs(Note: This requires UAC to be enabled.)
Troubleshooting
If none of the above steps work, here’s what to try next, ordered by complexity:
-
Check Windows Services.
- Press Win + R, type
services.msc, and press Enter. - Look for Windows Terminal Host and Command Processor. If either is set to Disabled, right-click > Properties > Startup type: Automatic.
- Press Win + R, type
-
Force a system restore (if CMD was recently modified).
- Open Control Panel > System and Security > System > System protection.
- Select your drive > Create a restore point > System Restore.
- Choose a restore point from before CMD started acting up.
Warning: This may undo recent changes (like new software) but will restore the original CMD.exe file.
-
Use a live USB to test CMD.
- Create a Windows 10/11 USB installer from Microsoft’s media creation tool.
- Boot from the USB and open a command prompt via the USB’s command line (not the Windows shell).
- If CMD works on the live system, your Windows installation is corrupted—reinstall Windows.
-
Check for antivirus interference.
- Temporarily disable all antivirus software (including Windows Defender’s real-time protection).
- Try launching CMD again. If it works, your antivirus is blocking CMD—add an exception for the file
C:\Windows\System32\cmd.exe.
-
Reset Windows 10/11 to default (last resort).
- Backup your data—this step is permanent.
- Open Settings > Update & Security > Recovery > Reset this PC.
- Choose Remove everything > Keep my files (unless you need recovery tools).
Note: This removes all apps and settings but keeps personal files. Useful only if CMD is the primary issue.
Frequently Asked Questions
Why does CMD open but give "Access Denied" errors?
The "Access Denied" error in CMD typically means Windows Security blocked the program. To fix:
- Open CMD as Administrator (Step 2).
- If CMD still won’t open, manually locate the executable (Step 3) and run it directly.
- If the error persists, create a new shortcut with compatibility settings (Step 5).
Can I force CMD to open from Task Manager?
Yes, but with a caveat: If CMD is locked in a loop (e.g., due to a script), you can force it to open by killing it and restarting explorer.exe. Here’s how:
- Open Task Manager (Ctrl + Shift + Esc).
- Find cmd.exe and end the task.
- Find explorer.exe (the Windows shell) and right-click > Restart.
- Now CMD should launch when you search for it in the Start menu.
Why won’t CMD open even after a full system restart?
If CMD fails to open after a restart, the issue is likely:
- A corrupted CMD.exe file (Step 7 or 8).
- A blockage in Windows Search or Task Manager (Step 6).
- Antivirus software interfering (Step 14).
Try the Safe Mode method (Step 7) or reinstall CMD via Windows Features (Step 8). If that fails, a system restore or reinstall is needed.
How do I open CMD without admin rights but still use it?
Use PowerShell or the built-in command line tools:
- Open PowerShell and run:
cmd /k(This launches CMD in the same window.) - Use built-in commands like:
dir(file listing),ipconfig(network info),systeminfo(system details).
For full CMD access, always open it as Administrator (Step 2).
My CMD is stuck in a loop—how do I kill it?
If CMD is unresponsive or frozen, force-kill it from Task Manager:
- Press Ctrl + Shift + Esc to open Task Manager.
- Go to the Details tab.
- Find cmd.exe and click End task.
- Restart explorer.exe by searching for
explorer.exeand right-clicking > Restart.
If CMD still won’t open, try the Safe Mode method (Step 7).
Can I restore CMD from a previous version?
Yes, but only if you have a backup or can access Safe Mode. Here’s how:
- Use Safe Mode (Step 7) and run:
cd /d %windir%\system32copy /y cmd_old.exe cmd.exe(If you don’t have cmd_old.exe, Step 7’s method creates a backup.) - Reboot normally.
If you don’t have a backup, reinstall Windows or use Windows Recovery Tools.