DEV Community

Youssef Mrini
Youssef Mrini

Posted on

Bash On Ubuntu

Did you know that you can use the Bash Shell on Windows 10? You are not dreaming, Bash is available on Windows 10 thanks to collaboration between Microsoft and Ubuntu-creator Canonical.
In this post, I will show you how to install the Bash Shell on Windows 10.
The Windows Subsystem for Linux (WSL) provides you with a command line development environment identical to the one available on Unix systems without the need for virtual machines.
In Windows 10 Creators Update, there are a number of improvements to Bash on Windows. Including the ability to launch Windows apps & tools from within Bash
Microsoft is also working with SUSE and Fedora to bring their Linux distros to the Windows Store & Windows Subsystem for Linux (WSL)

To install Bash in Windows 10 follow this steps:
Enable Developer Mode
Go to Settings | Update and Security | For developers
Select Developer mode

When you enable developer mode you receive a warning because you will be able to sideload apps and run apps from Visual Studio in debug mode. You must enable developer mode to use the Bash Shell on Windows. You can learn more about Developer mode at Docs.microsoft.com

Turn on the Windows Subsystem for Linux feature
Open Control Panel
Go to Programs | Programs and Features | Turn Windows features on or off

Select the Windows feature Windows Subsystem for Linux

Run Bash
Open the Command prompt
Run bash
You will be prompted to accept the license. Type y to accept the license.

The first time you install Bash on Windows, you will be prompted to create a UNIX username and password. This Unix username and password has no relationship to and can be different from your windows username and password.

Launching Bash on Windows

Launch Bash on Windows using either run bash at a cmd/PowerShell command-prompt
or with the Start menu shortcut.

Start Menu | Bash on Ubuntu on Windows

Type a command such as ls or echo to test your installation.

Congratulations you are running Bash on Windows! To learn more about this feature check out the MSDN documentation on Bash on ubuntu on Windows.

Twitter @youssefmrini

Top comments (0)