Ceci est une ancienne révision du document !
While I was translating the News column for the French version of Full Circle, one particular item caught my eye. It was actually about openSUSE running on Windows 10 rather than Ubuntu, because, the developers argue, openSUSE has been around for a long time and is very stable. But it did contain the following sentence : “In its Anniversary Update, Microsoft launched Windows Subsystem for Linux (WSL). This allowed the Windows 10 users to run Bash on Ubuntu on Windows 10.” I thought I'd try to find out more about this: how to install it, what can be done with it, by me in particular, just because the newness of the idea – running bash, on Ubuntu, on the Windows 10 kernel – sounded completely extraordinary. In addition, I must be among only a few Ubuntu users who actually use Windows 10 as their main operating system. So I can try the thing out with no extra effort… or very little. As the saying goes, “Fools rush in where angels fear to tread.”
My first move was to look up “WSL” with Bing on Edge, the Windows 10 browser. At first, that just got me a long list of various organizations (Spanish learners?), with, at the very bottom of the page, “Windows Subsystem for Linux.” Even using DuckDuckGo on Firefox, I got White Star Line, World Surf League, Westwood Shipping, and, finally, Bash on Ubuntu on Windows. Here's the link: https://msdn.microsoft.com/en-us/commandline/wsl/about. The page begins with this
“Important note This is the first release of this brand new technology and it is branded “beta” deliberately – it’s not yet complete! We know there are issues and incomplete features, you should expect some things to work, and many things to fail. But we appreciate you playing with this feature and helping us identify the issues we need to fix in order to deliver a great experience.”
You, meaning all people, but particularly developers, are definitely being invited to try it out and report back to Microsoft so they can fix whatever problems you come across. Basically, you can run “common command-line utilities, […], navigate the file system [apparently even your C: Windows], and run Bash shell scripts which rely on supported command-line utilities.”
After this enticing beginning, you can watch a 17-minute long video (on the same page) where two Microsoft Senior Program Managers insist that it's not a Virtual Machine, but Bash on Ubuntu on Windows, and show that you can do sudo apt-get install git. You can also do apt-date update and upgrade, which I did after my install. If you want to know… I've been writing all of this to put off having to install the thing, even though, on this same page, we are told that it's “just a few clicks”! We'll see about that.
The Install Guide is here: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide, and the first thing to note is that your Windows 10 must be a 64-bit version of the Anniversary Update build 14393 or later. To find out whether you meet the requirements, go to Settings > System > About
Looks like my five- or six-year-old Toshiba fills the bill (previous page, bottom right), but please excuse the French…
Next, you must turn on the Developer Mode (below) by hand. Go to Settings > Update and Security > For Developers, and select Developer Mode. But when I did, I got this rather daunting message:
Or, in plain English, “In Developer Mode, you can, among other things, install and run applications without going through the Windows Store. You will be exposing your machine and your personal data to security risks and may damage your machine. Are you sure you really want to do this?” When I clicked on Yes, a package began installing. The purple circle continued turning until after I'd saved the pictures above and below.
Question: will it be possible to get out of Developer Mode? Heaven only know, but sufficient unto the day is the evil thereof…
Okay, next: you must enable the Windows Subsystem for Linux feature in the graphical interface by going to Start > and down to the T's, for “Turn Windows Features on and off.” At least, that's what the instructions on the Install Page say. But, on my list of things, there's nothing at Turn, and there's nothing at Windows Features. This does not bode well. Google (or in this case Bing) being my friend, I found this page: https://windowsinstructed.com/turn-windows-features-windows/ It tells you to go into the Control Panel, but the all-business one is no longer easily available in Windows 10. What I had to do was go to Settings > System > Programs and functions. Then, at the very bottom of the list of your programs, under the title Related Settings, there is a link to “Programs and Functions”. When you click on that link, you get the familiar Control Panel from Windows 7. In the left-hand column, you'll find what the official instructions were referring to, that is “Turn Windows Features on and off.” So I ticked the “Windows Subsystem for Linux (beta)” and clicked on OK. Windows began searching for necessary files… and I went to watch TV a bit. When I next looked at my computer it was rebooting on its own.
It's true that the Install instructions say “you must restart when prompted.” But: • Windows rebooted without asking, and • I was supposed to be prompted to reboot after going into the Power Shell as administrator (open the menu of Windows Power Shell in the list of programs and right-click on Windows Power Shell, then choose Run as administrator), and typing “Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux” + Enter.
So I'll try doing that now. At least my computer is still working! AND, once it was done, RestartNeeded was False!
Now, theoretically, all I have to do is open a normal command prompt and type bash?!!!
Yesssss!!
Or, in English (bottom): – Beta feature – This will install Ubuntu on Windows, distributed by Canonical and licensed under its terms available here… Type “y” to continue:
I, in fact, typed “o” for “oui” to continue, and now Ubuntu is downloading from the Windows Store! (Canonical provided the code from Ubuntu 14,04 LTS, a.k.a. Trusty to Microsoft for this very purpose.)
That's done and now it's “Extracting file system, this will take a few minutes…” Once the installation has been declared successful, I'll be prompted to enter a “UNIX user name”, then to “Enter a new UNIX password:”, which I'll do before trying anything else. From now on, I will have a “Bash on Ubuntu on Windows” shortcut in my Start menu!!! It IS there… Awesome! Even though I'm neither a developer, nor, for that matter, a big user of the Command Line …
I've just done an update-upgrade (below) that seemed to work normally except that execution was denied to several things and “Upstart” couldn't connect to the socket – connection refused. AND I just wrote you a very short note with Nano to prove that Bash really does work.
“Bash on Ubuntu on Windows” has recently been added to my list of programs!