8

I have Bash on Ubuntu on Windows.

Bash on Ubuntu on Windows

The output of lsb_release -a is the following.

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

Should I upgrade? Do I risk to break it?

10

Yes its possible and there are two options:

  1. Use lxrunto install and uninstall bash:

    lxrun /uninstall
    lxrun /install
    
  2. Upgrade with do-release-upgrade:

    sudo do-release-upgrade
    

Information:

  • The second method might work according to the link given below, but that article is 2016 so this method might work.

  • Here is clip from Microsoft

    Note: WSL will install Ubuntu version 16.04 (Xenial) instead of Ubuntu 14.04 (Trusty) in an upcoming release. This change will apply to Insiders installing new instances (lxrun.exe /install or first run of bash.exe). Existing instances with Trusty will not be upgraded automatically. Users can upgrade their Trusty image to Xenial using the do-release-upgrade command.

Source:

https://www.howtogeek.com/278152/how-to-update-the-windows-bash-shell/

https://msdn.microsoft.com/en-us/commandline/wsl/release_notes#build-14936

  • I would like to upgrade my Ubuntu 16.04 LTS release. I can edit /etc/update-manager/release-upgrades by changing Prompt=lts to Prompt=normal and then do-release-upgrade duly informs me that Artful 17.10 can be installed. I haven't see this documented by Microsoft though. Has anyone tried it? – user643722 Mar 14 '18 at 10:16
  • For do-release-upgrade you might need to set RELEASE_UPGRADER_NO_SCREEN=1: sudo -S env RELEASE_UPGRADER_NO_SCREEN=1 do-release-upgrade (source: wsl-guide.org/en/latest/update.html) – amaslenn Sep 27 '18 at 12:41
  • @amaslenn: Here's a link that explains why RELEASE_UPGRADE_NO_SCREEN is needed: github.com/Microsoft/WSL/issues/927 – Heinzi Apr 8 '19 at 7:40
0

You should backup and reinstall WSL. This time you should install a newer version from the Windows Store choosing your favorite distro.

0
sudo -S apt-mark hold procps strace sudo
sudo -S env RELEASE_UPGRADER_NO_SCREEN=1 do-release-upgrade

These should update the Ubuntu on Windows to the latest version.

  • What's the -S flag for? – Svish Aug 7 '19 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.