Updating Ubuntu on Windows to Xenial

Pro Tip :
When i install Ubuntu on Windows 10 (or rather enable it from Add/Remove programs) i always get Ubuntu 14.04 Trusty, which is pretty old and a lot of new packages i expect are not available. Even doing a 'sudo apt-get upgrade' won't work unless you have the latest base OS out there. After a bit of search and application i found that you can upgrade to atleast Xenial (Ubuntu 16) using the following commands. It didn't look straight forward, so thought i will make a pro tip out of the work done. This took a couple of hours on a average windows machine, but with a good internet connection though !

Simply run the following commands.

$ sudo -S apt-mark hold procps strace sudo

$ sudo -S env RELEASE_UPGRADER_NO_SCREEN=1 do-release-upgrade

As you would from the internet,
do-release-upgrade -d

alone doesn't seem to work

A word of caution

  • Once ran you cannot revoke the changes. The only way is to do a lxrun /uninstall.
  • Please save any important files before upgrade. This might wipe out all your information, in case of failure.
  • lxrun /install will get you back to the good old default Ubuntu Trusty 14.04.

Have a good time with WSL !