Upgrade Windows 10 Ubuntu from 14.04 to 16.04

Submitted by SneWs on Thu, 2016-09-15 22:25

First off, this is unsupported, so do it at your own risk. You have been warned!

The Linux Subsystem (WSL) is a great thing on Windows 10. All cred to Microsoft for this. Well done so far. But there is one annoying thing here, the Ubuntu version is still 14.04 and albeit being a LTS release, 16.04 has been out long enough to have recv. it's first patch release. My servers has already been upgraded for example. So it is only natural that I would like to upgrade my Win10 Ubuntu install to 16.04 as well.

But, there are some problems, and this is that it is not supported to run, or more concrete, it crashes when you try to run the upgrade... So, let's see what we can do to work around this issue and try to upgrade.

We need to start with triggering the update command in a non-interactive mode

$ sudo do-release-upgrade -f DistUpgradeViewNonInteractive -d

The above command will run, and it will stop working once it starts to prompt for what config files to change to the new maintainer version etc. From here you will have to CTRL+C your way out, close the WSL window and start it up again.

Once back in, do a su to switch over to the root user, sudo will not work after the somewhat completed upgrade (at least that was the case for me). You will need to execute the dpkg configure command manually as a next step. Let's do the following.

$ su
$ dpkg --configure -a

Once the above is done and you have answered any interactive prompts there is only one thing left to do.