Software⏱️ 4 min read📅 2026-06-15

How to Fix: Error: Unable to run bash (Ubuntu app) on Windows 10 CMD

Error Unable to run bash on Windows 10 CMD due to lack of administrator privileges.

Quick Answer: Run the Ubuntu app as administrator or use a different command prompt.

Error: Unable to run bash on Windows 10 CMD is an issue that affects users who have installed the Ubuntu app on their Windows 10 machine. This error occurs when the user attempts to right-click and select 'Run As Administrator' within the Ubuntu app or tries to run a bash command from the Windows Command Prompt (CMD). The error message displayed in both cases is 'Error: 0x80070005'. Despite being given standard user rights by the IT administrator, this issue persists, causing frustration for users who rely on the bash shell for scripting and automation tasks.

This error can be frustrating for users who are accustomed to running bash commands from Linux or macOS systems. The inability to run bash within the Ubuntu app or from CMD hinders their ability to perform complex tasks and automate processes. In this troubleshooting guide, we will outline the possible root causes of this issue and provide step-by-step instructions for resolving it.

⚠️ Common Causes

  • The primary reason for this error is that the Ubuntu app does not have the necessary permissions to run as an administrator on Windows 10. This is due to a security feature implemented by Microsoft to prevent unauthorized applications from running with elevated privileges. As a result, when you attempt to right-click and select 'Run As Administrator' within the Ubuntu app or try to run bash from CMD, the system denies the request due to a lack of necessary permissions.
  • Another possible reason for this error is that the Windows Security Software (such as Windows Defender) is blocking the execution of the bash shell. This can occur if the software detects the bash shell as a potential threat and prevents it from running.

✅ Best Solutions to Fix It

Granting Elevated Permissions to Ubuntu App

  1. Step 1: Step 1: Open the Windows Settings app by pressing the Windows key + I. Navigate to System > Storage > Device management. Find the 'Ubuntu' entry and right-click on it. Select 'Properties'. Then, navigate to the 'Security' tab and click on the 'Edit' button next to 'Access this computer from'. Add your user account to the list of users who can access the Ubuntu app with elevated privileges.
  2. Step 2: Step 2: Restart the Ubuntu app by clicking on the 'X' in the top-right corner of the window. Then, right-click within the app and select 'Run As Administrator'. If prompted, enter your administrator password and confirm that you want to grant elevated permissions to the Ubuntu app.
  3. Step 3: Step 3: Test the bash shell by running a simple command such as 'echo Hello World!' in the CMD prompt. If the command executes successfully, it indicates that the bash shell has been granted elevated permissions and can be used without issues.

Workaround to bypass Windows Defender

  1. Step 1: Step 1: Open the Windows Defender settings by typing 'Windows Defender' in the Windows search bar. Navigate to Virus & threat protection > Settings. Click on the 'Manage virus and threat protection settings' button at the bottom of the page. Scroll down to the 'Exclusions' section and click on 'Add or remove exclusions'. Then, navigate to the 'File types' tab and add a new exclusion for the bash shell executable (usually located in the Ubuntu app's installation directory).

💡 Conclusion

By following these steps, you should be able to resolve the issue of not being able to run bash on Windows 10 CMD. If you encounter any issues during the troubleshooting process, feel free to restart your machine and try again. Remember to always exercise caution when running elevated commands or scripts to avoid potential security risks.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions