Scott Hanselman

Ubuntu now in the Windows Store: Updates to Linux on Windows 10 and Important Tips

July 10, '17 Comments [14] Posted in Linux | Win10
Sponsored By

I noticed this blog post about Ubuntu over at the Microsoft Command Line blog. Ubuntu is now available from the Windows Store for builds of Windows over 16215.


You can run "Winver" to see your build number of Windows. If you run Windows 10 you can certainly sign up for the Windows Insiders builds, or you can wait a few months until these features make their way to the mainstream. I've been running Windows 10 Insiders "Fast ring" for a while with a few issues but nothing blocking.

The addition of Ubuntu to the Windows Store may initially seem confusing or even a little bizarre. However, given a minute to understand the larger architecture it make a lot of sense. However, for those of us who have been beta-testing these features, the move to the Windows Store will require some manual steps in order for you to reap the benefits.

Here's how I see it.

  • For the early betas of the Windows Subsystem for Linux you type bash from anywhere and it runs Ubuntu on Windows.
  • Ubuntu on Windows hides its filesystem in C:\Users\scott\AppData\Local\somethingetcetc and you shouldn't go there or touch it.
  • By moving the tar files and Linux distro installation into the store, that allows us users to use the Store's CDN (Content Distrubution Network) to get Distros quickly and easily. 
    • Just turn on the feature and REBOOT
      Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

then hit the store to get the binaries!

Ok, now this is where and why it gets interesting.

Soon (later this month I'm told) we will be able to have n number of native Linux distros on our Windows 10 machines at one time. You can install as many as you like from the store. No VMs, just fast Linux...on Windows!

There is a utility for the Windows Subsystem for Linux called "wslconfig" that Windows 10 has.

Performs administrative operations on Windows Subsystem for Linux

/l, /list [/all] - Lists registered distributions.
/all - Optionally list all distributions, including distributions that
are currently being installed or uninstalled.
/s, /setdefault <DistributionName> - Sets the specified distribution as the default.
/u, /unregister <DistributionName> - Unregisters a distribution.

C:\WINDOWS\system32>wslconfig /l
Windows Subsystem for Linux Distributions:
Ubuntu (Default) Fedora

At this point when I type "bash" at the regular Windows command prompt or PowerShell I will be launching my default Linux. I can also just type "Ubuntu" or "Fedora," etc to get a specific one.

If I wanted to test my Linux code (.NET, node, go, ruby, whatever) I could script it from Windows and run my tests on n number of distros. Slick for developers.

TODOs if you have WSL and Bash from earlier betas

If you already have "bash" on your Windows 10 machine and want to move to the "many distros" you'll just install the Ubuntu distro from the store and then move your distro customizations out of the "legacy/beta bash" over to the "new train but beta although getting closer to release WSL." I copied my ~/ folder over to /mnt/c/Users/Scott/Desktop/WSLBackup, then opened Ubuntu and copied my .rc files and whatnot back in. Then I removed my original bash with lxrun /uninstall. Once I've done that, my distro are managed by the store and I can have as many as I like. Other than customizations, it's really easy (like, it's not a big deal and it's fast) to add or remove Linuxes on Windows 10 so fear not. Backup your stuff and this will be a 10 min operation, plus whatever apt-get installs you need to redo. Everything else is the same and you'll still want to continue storing and sharing files via /mnt/c.

NOTE: I did a YouTube video called Editing code and files on Windows Subsystem for Linux on Windows 10 that I'd love if you checked out and shared on social media!


Sponsor: Seq is simple centralized logging, on your infrastructure, with great support for ASP.NET Core and Serilog. Version 4 adds integrated dashboards and alerts - check it out!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Tuesday, 11 July 2017 14:24:22 UTC
> There is a utility for the Windows Subsystem for Linux called "wslconfig" that Windows 10 has.

Not Creators Update. Or at least it's not part of the %PATH% search variable, and "dir wslconfig.* /s" doesn't find it either.

I do have a very recent Insider release running in a VM, and I was going check on that, but it seems to be stuck "Working on updates 33%" right now - which is not good, as I had let it grab the latest update over 12 hours ago (as I'm writing this).
Tuesday, 11 July 2017 15:50:27 UTC
@Dandy72, You're right, you aren't missing anything, it's not in the Creators Update. The first line of the article (easy to miss, it appears above the first large image) states that: "Ubuntu is now available from the Windows Store for builds of Windows over 16215."
Tuesday, 11 July 2017 16:14:13 UTC
Does the store version still put everything in C: with no support for moving it? As long as that's the way it is, I'll never be able to use it (small C: on SSD). Hopefully that's been addressed.
Tuesday, 11 July 2017 16:39:49 UTC
Scott, how did you launch VS Code from Bash? I am using the Bash for Windows beta from the Anniversary Update and when I try to run
code .
I get
command not found: code
When I try to run
/mnt/c/Program\ Files\ \(x86\)/Microsoft\ VS\ Code/Code.exe .
I get this error
exec format error: /mnt/c/Program Files (x86)/Microsoft VS Code/Code.exe

Unfortunately, I cannot install an Insider build as this is my work machine and I'd like to stay on Stable.
Tuesday, 11 July 2017 18:38:12 UTC
(N00bs here) It is not clear to me. Will Gnome or another graphic interface be available in this environment ?
Tuesday, 11 July 2017 18:52:23 UTC
Hey Scott!

Thanks for the article!

Have a question, if I may. To use the Ubuntu app from VSCode, do we still use the:
"": "C:\\WINDOWS\\System32\\bash.exe",

or is there another way?

Thanks again!
Michael Heinrich
Tuesday, 11 July 2017 20:50:50 UTC
CarlD - Yes, you can go to "Default Save Locations" and tell the Store that you want store apps and/or games on other drives, and it should go over there. So *you* should personally benefit from this change.

Michael - Yes, bash will start the default linux, or you can use "Ubuntu" or "Fedora" for those.

Mark - The ability to run Windows exes happened in a later update then you have.
Scott Hanselman
Tuesday, 11 July 2017 20:51:20 UTC
JonT - There are hacks that make that possible, but totally not supported. This Linux is meant for developers in Text Mode.
Scott Hanselman
Wednesday, 12 July 2017 01:20:36 UTC
Just a quick note to add that if you do NOT uninstall the WSL you had installed under earlier builds, you can still use wslconfig to switch between versions just fine. The old one shows up as 'Legacy'. This is pretty cool! Hopefully we can start adding new distros to play with soon...
Thursday, 13 July 2017 00:09:58 UTC
@NuAngel, I didn't "miss" the first line; to me, it just didn't infer that wslconfig was new starting with that build, as there's no mention of it until a few paragraphs later.
Friday, 14 July 2017 10:56:29 UTC
It has actually been technically on the store since the day the Windows Subsystem for Linux came out – when you enabled it, it explicitly told you it was downloading it from the Windows Store.

What’s new here is that it now has a proper Windows Store page.
Friday, 14 July 2017 11:17:44 UTC
With XMing you can use graphical apps from WSL, here is example of WinForms on Mono called from pythonnet:
Sunday, 16 July 2017 10:54:51 UTC
What is the use case of this? Can you give some more information on this? I'm confused. Why would we want to have an OS in an OS app store?
Tuesday, 18 July 2017 21:30:20 UTC
@Tarik - Ubuntu on their Store is not an OS; it is a collection of Ubuntu resources and binaries that run on Windows Subsystem for Linux: Bash and an ABI shim between Windows and Linux ELF64 system calls.
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, li, ol, pre, strike, strong, sub, super, u, ul) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.