Janik von Rotz


1 min read

Update Windows Subsystem for Linux

Today I learned that certain Ubuntu package versions are bound to the release version of Ubuntu. For example the only available version of the password store tool pass for Ubuntu LTS 14.04 (trusty) is 1.4.2-3. If you need a newer version you have to update Ubuntu first. Usually this no big deal, however, if you work with Windows Subsystem for Linux (WSL) it is a big deal. The WSL release is bound to the Windows version. In result to update a package you have to update your Windows first.

Common Solution

In case your Windows version is newer than your WSL version uninstall WSL.

lxrun /uninstall /full

And reinstall WSL.

lxrun /install

Once finished you can check the version with lsb_release -a.

Ugly Hack

If you work in corporate environment you might not be able to get the latest Windows release. In this case you have to update Ubuntu itself which is not supported by Microsoft.

First we have to prevent certain packages from being updated.

sudo -S apt-mark hold procps strace sudo

These commands have been modified especially for WSL.

Next run the release upgrade command.

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

If the update successfully finished you should be on the latest release.

Categories: Unix , System tooling
Tags: linux , trusty , ubuntu , windows subsystem for linux , wsl , xenial
Improve this page
Show statistic for this page