Shares

Whether you just want to geek around with this or for serious work/developement/learning/testing purposes, it is an interesting option for users of Windows 10. The Add-On feature, which Microsoft calls “Windows Subsystem for Linux” (WSL) and it runs a genuine Ubuntu user-mode image allowing you to run native Bash shell and execute bash scripts or run command line tools directly from Within your Windows environment. As the feature has been added to Windows 10 just recently, this post will teach you about the details and how to activate/install – How to Install Ubuntu Bash Shell on Windows 10.

The idea is not new, but previously you had to install some kind of desktop virtualization product such as VMware Workstation, Fusion or Player. Then only you could install your own Linux distribution and have fun with Linux. Now, this bash shell is kind of tightened with W10 as you can access the underlying Windows file system to work on your documents or have a network access to the Bash shell.

It is not a virtual machine, it is not a container. It's a real native Bash environment to run Linux apps and commands on Windows. It is available in the Windows Store, and it provides a full Ubuntu image that runs in userspace as a program on your desktop. Programs compiled for Linux runs without needing to be recompiled for Windows. You can use Ubuntu’s apt-get command to download and install programs, etc, etc.

BASH is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distros and in OSX. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks.

What do you need to add this to your Windows 10 x64?

(yes, only x64 versions of Windows are supported).

The new ‘Windows 10 Anniversary Update’ installed (check the version of you Windows > Press Win+R > Type winver > PressEnter. Anniversary update has 1607 build number. You should see Version 1607 (OS Build 14393.10) or HIGHER.

build number. You should see A Windows 10 x64 version running on your PC

Step 1: Enable developer Mode – Go to Settings (WIN-I key) > Update & Security > For Developers > Select Developer Mode option. After confirming you'll see that the packages are downloaded in the background (see that little animation).

You'll need to confirm this as it is a certain security risk. Running apps without the benediction of Microsoft??? -:)

This process will take few seconds.

Step 2: Add the Windows subsystem for Linux (WSL) via Add/remove programs.

You'll need to reboot.

After reboot, you can quickly open the Bash shell by typing Bash via Cortana search box or you can also invoke the bash command via cmd line.

You'll need to type “y” to accept and continue. The system will download the App from Windows store.

Then you're asked to create a Unix user and provide a password.

This is it.

Now you can easily add the shortcut to the start menu. (Via right-click > Pin to start)

You can check the executable at this path:

C:\Windows\System32\bash.exe

So, this is it. Don’t expect a graphical Linux desktop, the feature is targeting developers and coders.

You can still do quite a lot. Things which previously wasn't possible within native Windows environment. You'd have to install a VM or at least Cygwin. Now you can:

Run usual command-line utilities ( grep, sed, and awk ) Navigate within the file system by using these commands Run Bash shell scripts which rely on supported command-line utilities

Quote from MSDN:

Windows is running Ubuntu user-mode binaries provided by Canonical. This means the command-line utilities are the same as those that run within a native Ubuntu environment.

Yes, it is pretty cool. Who would imagine this few years back!

You can run those command line editors:

vi

emacs

ssh

So lastly, you can also SSH directly to your ESXi host…. -:)

How – To completely uninstall Ubuntu on Windows?

From PowerShell window type:

lxrun /uninstall /full

If you want to reinstall, then simply from a command prompt, reinstall by typing “bash”.

More on ESX Virtualization:

Shares