How To Enable Linux Bash in Windows 10

How To Install Linux Bash in Windows 10

How To Install Linux Bash in Windows 10

How To Install Linux Bash in Windows 10

With the release of the Windows 10 Anniversary update, which was built largely on feedback from users who were part of the Insider Preview Program for Microsoft’s newest OS, we wanted to highlight one feature of Windows 10 that we’ve found to be particularly useful. The Windows 10 Build 14393 enabled users to run a native Bash shell on Ubuntu on Windows 10. As Microsoft said when announcing this feature:

You can now run Bash scripts, Linux command-line tools like sed, awk, grep, and you can even try Linux-first tools like Ruby, Git, Python, etc. directly on Windows. You can also access your Windows filesystem from within Bash allowing you to work on the same set of files using your preferred Windows tools or Linux command-line tools.

Enabling Bash isn’t difficult, but it’s also not strictly intuitive. Here’s what you need to do.

Enabling Bash in Windows 10

First, make sure you’re turned on Developer Mode by going to Settings > Update & Security > For Developers.

Windows 10 Developer Mode

Next you’ll need to turn on the Windows Subsystem for Linux by navigating to Control Panel > Programs > Programs and Features and clicking on the link in the left column that says “Turn Windows Features on or off“. Then simply select the box next to Windows Subsystem for Linux (Beta) and hit OK.

Installing Bash - Add Features to Windows 10

Installing Bash in Windows 10

To install Bash first open the command prompt. You can get to the command prompt any number of ways but in the image below we simply pressed the Windows Key + X. Then click on Command Prompt or Command Prompt (Admin) if the options is available.

Command Prompt

Once you’ve opened the command prompt, simply type bash and then y and wait for the Ubuntu subsystem to be downloaded and installed.

Installing Bash at the Command Prompt in Windows 10

Once the install is complete you’ll be placed in the Bash environment and you’re off and running with the Linux command-line tools and Bash scripts you know and love.

After Installing Bash at the Command Prompt in Windows 10

NOTE: Depending on your settings and system, you may be asked to create a UNIX user account before installation is completed. As the prompts will indicate, your UNIX username does not need to match your Windows account. Simply follow the prompts to create a username and wait for the installation process to finish.

Unix User Account Creation in Windows 10 Bash

Comments (2)

  1. ahmed_eld
    August 9, 2016

    so,,what the different between that and having ubuntu as complete operation system

  2. Darek Fanton
    Darek Fanton
    August 10, 2016

    Hi Ahmed, thanks for your question. In general what installing Bash allows you to do is retain the benefits of a Windows operating system and the interface of a Linux environment without having to dual-boot or find another workaround. There are still a number of applications that are more compatible with Windows but many users prefer to work in Linux. In some ways installing Bash gives you the best of both worlds.

Leave a Comment

Your email address will not be published.