[Linux] Update Ubuntu in WSL

As there is no latest version (20.10) in Microsoft Store, For updating WSL Ubuntu to latest version, it need to do it by ourselves.

Steps as below.

  1. Change default upgrade behavior settings.
    Execute command below and change Prompt to normal then input Ctrl-X to exit.

    sudo vi /etc/update-manager/release-upgrades

  2. Upgrade current release to latest version to ensure it can detect latest Ubuntu.
    Execute command below.

    ## Refetch repo settings.
    sudo apt-get update -qq
    
    ## Refetch package.
    sudo apt-get upgrade -qq
    
    ## Update OS.
    sudo do-release-upgrade

     

About C.H. Ling 260 Articles
a .net / Java developer from Hong Kong and currently located in United Kingdom. Thanks for Google because it solve many technical problems so I build this blog as return. Besides coding and trying advance technology, hiking and traveling is other favorite to me, so I will write down something what I see and what I feel during it. Happy reading!!!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.