Updating Bash of Ubuntu on Windows 10

in #steem7 years ago

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 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.....

Sort:  

This post has received a 100.00 % upvote from @khoa thanks to: @magicstone1412.

-----------------------Send any amount to get an up-vote...........................

C00L, @magicstone1412


Thanks for sharing your knowledge, I will upvote and follow you 😉

  • I invite you to check out my blog - my interests are pictures, programming, computer and all life related stuff ✴️

Thanks, followed you

This comment has received a 25.21 % upvote from @khoa thanks to: @khoa.

-----------------------Send any amount to get an up-vote...........................

This post has received a 0.78 % upvote from @drotto thanks to: @banjo.

Great post keep up the good work also if you want you can follow me and comment on my post so that you can receive more up votes from me.