Ubuntu Bash on Windows 10

From ICO wiki
Revision as of 22:12, 8 May 2016 by Mdhasan (talk | contribs)
Jump to navigationJump to search

Intro

A recent upgrade to early versions of Windows 10 added the ability for the OS to easily run a selection of native Linux software.

Test builds of Windows 10 available under the Windows Insider program can run the Bash shell, a command line interpreter that is available in many different Linux distributions, as well as Mac OS X.

The shell includes tools that allow power users to execute complex chains of commands and automate them using scripts.

Bash is available via a Universal Windows Platform app. The app runs on the Windows 10 desktop and provides an image of the Linux-based OS Ubuntu that Bash runs on. A selection of native Ubuntu command line software can be installed — such as the version control tool Git and the compiler gcc — and, in general, applications seem perform relatively well.

To add the Bash app to your Start menu in Windows 10, you'll first need to be signed up to test Windows 10 as part of the Windows Insider program, which you can join by following the steps here.

Once your Windows 10 Insider build is up and running these are the steps you need to take to add Ubuntu Bash to the Start menu:

Step by step guide

Switch to the Fast Ring

To be able to use Bash on Ubuntu on Windows you'll need to be in the Windows Insider Fast Ring, which will give you access to the latest Windows 10 test builds.

To enable this go to the Start menu, click Settings ->Update & security -> Advanced options (Figure A)'

Near the bottom of the 'Advanced options' window is written 'Choose your Insider level'. Below this text is a blue bar with a slider on it. Pull this slider to the right edge of the bar.

This should select the 'Fast Ring' (Figure B).

After a period, often several hours, Microsoft will switch you to the Fast Ring and Windows Update will begin downloading the latest Windows 10 build, which includes access to Bash on Ubuntu on Windows

Turn on Developer Mode

Once your machine is updated, you'll need to enable Developer Mode. From the Start menu go to Settings -> Update & security. From this page click on the 'For developers' option in the lefthand sidebar (Figure C).

Click the 'Developer mode' radio button and click 'Yes' on the pop-up window titled 'Use developer features' (Figure D).


Now reboot the machine.

Enable 'Windows Subsystem for Linux'

Search for "Windows Features" in the Taskbar and select "Turn Windows features on or off"(Figure E)


Scroll down to the bottom of the 'Windows Features' window and tick the checkbox labelled 'Windows Subsystem for Linux'.



Install Bash on Ubuntu

Click the search box on the Taskbar and type 'cmd'. Open the Command Prompt (Figure G).

Type 'bash' into the command line, hit return, and Windows will begin installing Bash on Ubuntu (Figure H). Accept the terms of service and it will download Ubuntu - which may take some time depending on the speed of your internet connection.

Following the install, you'll be placed into Bash running Ubuntu 14.04 on the Windows Subsystem for Linux (Figure I).

Add Bash on Ubuntu to the Start menu

Close the command prompt and search for 'Ubuntu' in the Taskbar. Right click on the 'Bash on Ubuntu on Windows' icon and click 'Pin to Start' (Figure J).

Click on the Start menu and you can see the Bash on Ubuntu on Windows pinned as a tile and ready to use (Figure K).

Once in Bash, if you want to access your Windows files, type 'cd mnt/{your drive letter}' — replacing '{your drive letter}' with the letter of your main Windows drive.