How to run Bash on Ubuntu on Windows 10 Anniversary Update or Preview Build 14316
Microsoft has been showing Linux a lot of love recently, and at Build 2016 the company announced that the Bash shell was coming to Windows 10. It’s a feature that will make an appearance in the upcoming Windows 10 Anniversary Update (due for release in July), but it's something that Windows Insiders on the Fast Ring already have access to in Build 14316 right now.
If you have installed this build, you'd be forgiven for not being able to find Bash however hard you look; there are hoops you have to jump through. So if you like the idea of accessing the Linux command line in Windows 10, there are a few steps for you to follow, starting off by enabling Developer Mode.
As Microsoft explains: "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".
Here are those all-important Bash-enabling steps:
- Open up Settings, click Update & security, and then head to the For developers section. Select the Developer mode option, click Yes to confirm, and then exit Settings.
- Hit the Windows key (or the Start button), type Windows features, and click the Turn Windows Features on or off entry that appears.
- Scroll down to the bottom of the list, check the box next to the Windows Subsystem for Linux (Beta) option, and click OK.
- Wait for a moment while Bash is installed and then click Restart now to restart your computer and complete the process.
- When Windows is back up and running, open a command prompt window, type bash and hit Enter.
- You'll see a message that reads 'This will install Ubuntu on Windows, distributed by Canonical and licensed under its terms'. Press Y followed by Enter to download the software from the Windows Store and complete the installation.
In future, you can access Bash via the Bash on Ubuntu on Windows shortcut in the All Apps section of the Start menu.