Skip to content

[Fix] Commands Not Working in Command Prompt (Windows 10/11)

If you are getting frustrating error messages or no response at all while trying to execute commands in the Windows Command Prompt, It could be due to several reasons. In this tutorial, we’ll check out the solutions to fix the commands not working issue in Command Prompt in Windows 10 and 11. We’ll dive deep into the common reasons why commands may not work as expected or the Command Prompt is not recognizing commands and provide practical solutions to make things work for you.

The idea to write this guide occurred to me from a personal experience. Windows PowerShell commands worked normally on my PC but, for some reason, the commands I issued returned errors saying the Command Prompt does not recognize commands.

'ipconfig' is not recognized as an internal or external command, operable program or batch file.

ipconfig command not working in command prompt

Not just ipconfig, but any of the Windows Command Prompt commands also didn’t work at all and I got the same error message.

Fixing the Command Prompt not Opening Issue

In this troubleshooting guide, we’re going to offer practical solutions that will have your Command Prompt up and running smoothly. Let’s get started!

1. Open the Command Prompt from CMD Executable

There are several ways to open the Command Prompt. However, if you are unable to launch it from the Windows Start menu, you can try other ways.

  1. Open the File Explorer on your PC.
  2. Navigate to C:\Windows\System32 or C:\Windows\SysWOW64\. You can simply paste one of these paths into the File Explorer’s address bar and hit the Enter key.
  3. Look for cmd.exe in the System32 directory.
  4. Right-click on the file and select the Run as administrator option from the context menu. to launch CMD with admin privileges.

If the File Explorer method didn’t work for you try the next method.

2. Launch CMD from Task Manager with Admin Privileges

There are 2 ways to launch the Command Prompt as an administrator in Windows 10 and 11 via the Task Manager.

  1. Open the Task Manager using the Ctrl + Shift + Esc keyboard shortcut.
  2. Click on File > Run new task.start ne task in windows task manager
  3. A new pop-up window entitled Create new task will appear.
  4. Type ‘cmd’ in the text area, select the Create this task with administrative privileges option, and then clock on the OK button. The Command Prompt window should command prompt in task manager

Alternatively, you can also open the Command Prompt as an administrator by holding the Ctrl key while clicking the File> Run new task option.

open command prompt admin in task manager

If you couldn’t make the CMD window launch via the Task Manager, don’t forget to check out our tutorial describing 18 ways to open the Command Prompt in Windows 10 and 11.

3. Run SFC Scan via PowerShell

Running an SFC (System File Checker) scan via PowerShell is an efficient method to ensure the integrity and stability of the Windows operating system. SFC scan safeguards against potential software failures, unexpected crashes, application malfunctions, or even security vulnerabilities arising from compromised system files.

If the Command Prompt is not opening on your PC or it opens and closes immediately in Windows 11 or 10, it may be due to corrupted or missing system files. You can perform an SFC scan to repair those files. This method can also help if the Command Prompt is not showing the output when you run a command,

  1. Launch PowerShell as an administrator. If you don’t know how to do that, here are 17 ways to open Windows PowerShell.
  2. When the PowerShell window pops up, simply type the following command and press the Enter key.
    sfc /scannow

    sfc scan now windows command powershell

  3. The command will identify and repair corrupted or missing system files. When the scan is complete, close PowerShell and try opening the Command Prompt.

4. Perform a System Restore

Since I keep testing things on my Windows PC, I sometimes run into trouble, and in that case, performing a system restore is my first resort. If you remember creating a system restore point when the Command Prompt was working fine on your computer, you can restore all settings and undo the recent changes to your computer.

  1. Type “create a restore point” in the search box located in the Windows Start menu or the taskbar. Click on Create a restore point.
  2. Then click on the System Restore > Next button.system restore option windows 11
  3. You’ll now have the list of all the system restore points you created. Select the restore point and click on the Next button.perform a system restore in windows 11

When your PC is restored, try running the Command Prompt. If you are still unable to open and use the Command Prompt, try the next potential fix to resolve the issue.

Fixing Command Prompt not Working Error

If the Command Prompt is opening normally for you but you are not able to execute any command, try the following solution.

Edit Path System Environment Variable

If the Command Prompt commands are not working for you and you get the command not recognized error, it may be due to a path variable missing in your computer. Once you add that variable, the Windows Command Prompt will start working again. Here is how to change or edit the environment variables.

  1. Click on the Windows icon to open the Start Menu.
  2. Type “advanced system settings” in the search field and select View advanced system settings.view advanced system settings windows 11
  3. The System Properties window will pop up. Click on the Environment Variables environment variables in windows 11
  4. A new window showing the list of all existing variables will appear.
  5. Look for the Path variable extry under the System variables pane. Make sure that the value of Path is C:\windows\system32. In my case, it was set to C:\Technastic\platform-tools and that’s why I was unable to execute any command in the Command Prompt. In some cases, the path variable might be missing.path variable in windows 10
  6. If the path variable is missing, click on the New… button located below the System variables pane. In case the value of the path variable is different from the one mentioned above, select the Edit… button instead.
  7. A new window will pop up that will let you create or edit a system variable. Set the variable name to ‘Path‘ and the variable value to %systemroot%\system32, C:\windows\syswow64\, or C:\windows\system32.create a new system pariable in windows 11
  8. Then click on the OK button to save your changes. You’ll need to click on OK in the Environment Variables window and also on the System Properties window.environment variables in windows 11
  9. Restart your Windows PC, launch the Command Prompt, and try executing any command. The Command Prompt should work fine now! Having made the above changes in the path variable, I was able to use the ipconfig and other commands normally.command prompt commands working in windows 11

The above fix should solve the command not working in the Command Prompt on your Windows PC. However, if you still grappling with the problem, you might need to try the following solutions in the order they are mentioned.

  1. Update Windows
  2. Disable your antivirus program.
  3. Create a New User Account.
  4. Boot your PC in Safe Mode and run the Command Prompt.
  5. Reset your Windows PC.
  6. Re-install Windows on your PC.

From updating Windows and antivirus software to running SFC scans and restarting your computer, chances are that one of these solutions will help solve the issue. If all else fails, then it may be necessary to reinstall or repair Windows itself. With these tips in hand, hopefully, anyone experiencing this problem will be able to get their Command Prompt working properly again.

Read Next: 250+ Keyboard Shortcuts for Windows 10/11

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.