Updating Bash of Ubuntu on Windows 10

Words
203
Reading
1 min
Listen
Play
9y

As you may know, we can run Linux natively on Windows 10. If you don't know how to do it, take a look at a post from liberosist@liberosist here. For some reasons, you wanna update the Bash of Ubuntu on Windows 10 to a desired version of Ubuntu. For instance, I have done an upgrade from Ubuntu 14.04 to 16.04.

Requirements:

  • Active Windows Subsystem for Linux (WSL). You can refer here.
  • Basic knowledge of Linux command line. You can find on internet.

Check Which Version of Ubuntu You Have

  1. Run Bash as Administrator right

    RunBashasAdminRight.jpg

  2. Run command lsb_release -a

    Ubuntu 14.04 on Windows.jpg

Updating Windows Bash Shell to Ubuntu 16.04

  1. Change sources.list to desired Ubuntu version and choose nearest location from you to improve download speed. Run command sudo nano -B /etc/apt/sources.list
    It should look like

    source.list.jpg

  2. To generate your own sources.list contents, you can stop by [https://repogen.simplylinux.ch]( https://repogen.simplylinux.ch/, ), choose the parameters as you need as below image. At this step, you can you Ubuntu release.

    Generating Ubuntu Sources List.jpg

    Ubuntu Sources List 16.04.jpg

  3. Copy generated text contents and paste to source.list file above.

  4. Save and exit nano.

To avoid the sudo tty issue and others, run these commands just before running upgrade:

sudo -S apt-mark hold sudo
sudo -S apt-mark hold procps
sudo -S apt-mark hold strace

Now let’s update Ubuntu.

sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove

​ And you’re done.

Check again to make sure you update successfully.

lsb_release -a

Ubuntu 16.04 on Windows.jpg


( ͡° ͜ʖ ͡°) => .....magicstone1412.....

Updating Bash of Ubuntu on Windows 10 | Ecency