create account

How to install & upgrade Windows Subsystem for Linux 2.0 by themarkymark

View this thread on: hive.blogpeakd.comecency.com
· @themarkymark ·
$45.98
How to install & upgrade Windows Subsystem for Linux 2.0
Yesterday I made a post talking about [Windows Subsystem for Linux 2.0](https://peakd.com/windows/@themarkymark/windows-subsystem-for-linux-2-0) and the improvements over 1.0.

This post will go over how to install Windows Subsystem for Linux 2.0 if you don't have it installed already and how to upgrade if you have WSL 1.0 already installed.

# Installing WSL 2.0

#### Update to Windows version 2004

You first need to make sure you have Windows 10 build version 2004 or greater.  You can check your build by going to system.

https://i.imgur.com/p9vwuh1.png

https://i.imgur.com/nAQf4HO.png

If you do not already have 2004 and you do not see any updates under Windows Update, you can force the install by using [Microsoft Windows Update Assistance](https://www.microsoft.com/en-us/software-download/windows10).  The upgrade will take around an hour.

#### Install Subsystem for Linux

In the start menu launch the program and features settings by typing in features

https://i.imgur.com/tD1sOZA.png

You want to select both Windows Subsystem for Linux & Virtual Machine Platform

https://i.imgur.com/bSb2r2d.png
https://i.imgur.com/LIMVvD6.png

Once these finish installing, you will be asked to reboot.

#### Install the kernel update

Seeing as Microsoft now uses a real Linux kernel with WSL 2.0, you need to install the [kernel update patch](https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel).

Microsoft is using a real Linux kernel and no longer running a translation layer for system calls.

#### Update your distribution

If you already have Linux installed for WSL 1.0, you can update it to 2.0 so it can take advantage of all the new features using the commands:

`wsl -l -v`

This will list out all your Linux installs.

You can then update them by name.

`wsl --set-version Ubuntu 2`

I recommend setting the default version to 2.0 for future installs.

`wsl --set-default-version 2`

Depending on how much you have used your Linux distribution, the conversion to 2.0 can take a little time.

#### Install a Linux distribution

If this is a new install of WSL, you can download your choice of Linux from the Microsoft Store.

Do a search for **Linux** in the Microsoft Store and this should bring up most of the options available.

https://i.imgur.com/04E88Go.png

https://i.imgur.com/zXxjRlL.png

I recommend Ubuntu 20.04 but you can choose any of the other options.

Once installed, it will prompt you to create a user.

#### Install Windows Terminal

I also recommend installing **Windows Terminal**.  It is a beta product from Microsoft that allows you to easily launch Powershell, CMD, and Bash from the same terminal.

https://i.imgur.com/qMp86e4.png

It also allows you to quickly start your Linux distribution, I typically will just use my SSH client but Linux is not started when Windows is started.  So you need to initially start it and optionally SSH.

https://i.imgur.com/Vgzx5Og.png

At this point, you are all set and can start using & developing Linux native applications within Windows.

WSL 2.0 is not a virtual machine (even though it does use a tiny virtual machine to bootstrap it).  WSL is a full-blown Linux distribution running native Linux applications.

The performance of WSL 2.0 is amazing compared to WSL 1.0, in most cases, it is near-native speed now.

**My next post will cover a cool feature that allows you to use WSL 2.0 to develop on Windows much easier than you thought possible.**

---

<center>Securely chat with me on [Keybase](https://keybase.io/officialmarky)
<center>https://steemitimages.com/DQmcWxV1dpA1eAtw2ipwZiWZkydyVNU5LaLa2Ak1GUnbGmS/The-Marky-Mark.png </center>
# <center>  [Why you should vote me as witness](https://peakd.com/witness-category/@themarkymark/why-you-should-vote-for-themarkymark-as-witness)  </center> #   




👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 402 others
👎  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 439 others
properties (23)
authorthemarkymark
permlinkhow-to-install-and-upgrade-windows-subsystem-for-linux-2-0
categoryhive-163521
json_metadata{"app":"peakd/2020.05.5","format":"markdown","tags":["linux","technology","microsoft","windows","palnet","neoxian"],"users":["themarkymark"],"links":["/windows/@themarkymark/windows-subsystem-for-linux-2-0","https://www.microsoft.com/en-us/software-download/windows10","https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel","https://keybase.io/officialmarky","/witness-category/@themarkymark/why-you-should-vote-for-themarkymark-as-witness"],"image":["https://i.imgur.com/p9vwuh1.png","https://i.imgur.com/nAQf4HO.png","https://i.imgur.com/tD1sOZA.png","https://i.imgur.com/bSb2r2d.png","https://i.imgur.com/LIMVvD6.png","https://i.imgur.com/04E88Go.png","https://i.imgur.com/zXxjRlL.png","https://i.imgur.com/qMp86e4.png","https://i.imgur.com/Vgzx5Og.png","https://steemitimages.com/DQmcWxV1dpA1eAtw2ipwZiWZkydyVNU5LaLa2Ak1GUnbGmS/The-Marky-Mark.png"]}
created2020-06-07 13:44:15
last_update2020-06-07 13:44:15
depth0
children22
last_payout2020-06-14 13:44:15
cashout_time1969-12-31 23:59:59
total_payout_value25.227 HBD
curator_payout_value20.751 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,803
author_reputation1,774,203,094,422,489
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,823,982
net_rshares95,399,956,207,828
author_curate_reward""
vote details (969)
@apshamilton ·
Does it only work on Windows Pro or also on Windows Home?
properties (22)
authorapshamilton
permlinkre-themarkymark-202067t183642900z
categoryhive-163521
json_metadata{"tags":["linux","technology","microsoft","windows","palnet","neoxian"],"app":"esteem/2.2.5-mobile","format":"markdown+html","community":"hive-125125"}
created2020-06-07 15:36:42
last_update2020-06-07 15:36:42
depth1
children1
last_payout2020-06-14 15:36:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length57
author_reputation212,408,658,018,768
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,825,797
net_rshares0
@themarkymark ·
In theory it would probably work.  I haven't tested it but the way WSL works I wouldn’t recommend it. 

There is no init system with WSL so you need to use Windows scheduler to start applications.  

WSL also doesn’t stay running as well as a dedicated machine.  Recently they added the ability to run background tasks even when closing shell but I wouldn’t use it for a service that needs to stay running.  Especially when you spend 6hrs to 4 days to do a replay just to get it synced up. 
properties (22)
authorthemarkymark
permlinkre-apshamilton-qbkc88
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-07 15:55:21
last_update2020-06-07 15:55:21
depth2
children0
last_payout2020-06-14 15:55:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length490
author_reputation1,774,203,094,422,489
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,826,124
net_rshares0
@joshman ·
It looks like your post got attacked by an army of angry vikings!
properties (22)
authorjoshman
permlinkre-themarkymark-qbl9bx
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-08 03:50:21
last_update2020-06-08 03:50:21
depth1
children4
last_payout2020-06-15 03:50:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length65
author_reputation277,932,931,100,174
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,836,595
net_rshares0
@themarkymark ·
Just two, minimalpris and his 490 account bot army, and about 8-10 from lokiyngling.
👍  
👎  
properties (23)
authorthemarkymark
permlinkre-joshman-qbl9f1
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-08 03:52:12
last_update2020-06-08 03:52:12
depth2
children3
last_payout2020-06-15 03:52:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length84
author_reputation1,774,203,094,422,489
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,836,630
net_rshares-106,979,823,449
author_curate_reward""
vote details (2)
@joshman ·
Wow, very interesting incoming voting patterns on that first one!  
properties (22)
authorjoshman
permlinkre-themarkymark-qbl9nn
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-08 03:57:24
last_update2020-06-08 03:57:24
depth3
children2
last_payout2020-06-15 03:57:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation277,932,931,100,174
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,836,725
net_rshares0
@mtl1979 · (edited)
I had to use "wsl -l --all" to list all Linux installations... "wsl -l -v" didn't work.

Also, to upgrade, I had to use "wsl --upgrade Ubuntu-18.04"
properties (22)
authormtl1979
permlinkqbkbgg
categoryhive-163521
json_metadata{"app":"hiveblog/0.1"}
created2020-06-07 15:38:39
last_update2020-06-07 15:41:00
depth1
children8
last_payout2020-06-14 15:38:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length148
author_reputation901,077,179,728
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,825,832
net_rshares0
@themarkymark ·
It should be minus L minus V for list and version. 

The name is whatever your installation name is from the above command. That’s why I suggested listing the installations. 
properties (22)
authorthemarkymark
permlinkre-mtl1979-qbkc1m
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-07 15:51:24
last_update2020-06-07 15:51:24
depth2
children7
last_payout2020-06-14 15:51:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length174
author_reputation1,774,203,094,422,489
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,826,065
net_rshares0
@mtl1979 ·
> Arguments to manage Windows Subsystem for Linux:
> 
>     --export <DistributionName> <FileName>
>         Exports the distribution to a tar file.
>         The filename can be - for standard output.
> 
>     --import <DistributionName> <InstallLocation> <FileName>
>         Imports the specified tar file as a new distribution.
>         The filename can be - for standard input.
> 
>     --list, -l [Options]
>         Lists distributions.
> 
>         Options:
>             --all
>                 List all distributions, including distributions that are currently
>                 being installed or uninstalled.
> 
>             --running
>                 List only distributions that are currently running.
> 
>     -setdefault, -s <DistributionName>
>         Sets the distribution as the default.
> 
>     --terminate, -t <DistributionName>
>         Terminates the distribution.
> 
>     --unregister <DistributionName>
>         Unregisters the distribution.
> 
>     --upgrade <DistributionName>
>         Upgrades the distribution to the WslFs file system format.
> 
>     --help
>         Display usage information.
properties (22)
authormtl1979
permlinkre-themarkymark-qbkc78
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-07 15:54:54
last_update2020-06-07 15:54:54
depth3
children6
last_payout2020-06-14 15:54:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,134
author_reputation901,077,179,728
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,826,114
net_rshares0
@networkallstar ·
WSL sorta reminds me of LSL. Who remembers Leisure Suit Larry???? 😍
properties (22)
authornetworkallstar
permlinkqbsvcn
categoryhive-163521
json_metadata{"app":"hiveblog/0.1"}
created2020-06-12 06:29:12
last_update2020-06-12 06:29:12
depth1
children0
last_payout2020-06-19 06:29:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation-6,043,364,106,826
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,915,735
net_rshares0
@toofasteddie ·
Great, thanks for sharing. However, I'm more interested on the opposite...What software you reccomend to install for running windows apps on a linux distro?
properties (22)
authortoofasteddie
permlinkre-themarkymark-qbkp5b
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-07 20:34:24
last_update2020-06-07 20:34:24
depth1
children2
last_payout2020-06-14 20:34:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length156
author_reputation667,851,797,049,493
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,830,239
net_rshares0
@themarkymark ·
I don't typically do that, but I would recommend running a Windows Virtual Machine, but if you want to install directly then **WINE** is probably the best option.  I would do what I could to replace Windows apps with native Linux ones if at all possible.

If it is games, there is a new game project that is gaining success, forget the name but shouldn't be too hard to find.
properties (22)
authorthemarkymark
permlinkre-toofasteddie-qbksqd
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-07 21:51:48
last_update2020-06-07 21:51:48
depth2
children1
last_payout2020-06-14 21:51:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length375
author_reputation1,774,203,094,422,489
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,831,540
net_rshares0
@r0nd0n ·
Proton.
properties (22)
authorr0nd0n
permlinkre-themarkymark-qby1oh
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-15 01:33:54
last_update2020-06-15 01:33:54
depth3
children0
last_payout2020-06-22 01:33:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7
author_reputation30,016,317,522,307
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,969,850
net_rshares0
@transisto · (edited)
> version 2004 - started rolling out a couple of weeks ago, and the problems we’re seeing could fill a book.

https://www.computerworld.com/article/3561635/bumps-on-the-road-to-the-win10-version-2004-rollout.html

I'll wait a bit.
properties (22)
authortransisto
permlinkqbktgf
categoryhive-163521
json_metadata{"links":["https://www.computerworld.com/article/3561635/bumps-on-the-road-to-the-win10-version-2004-rollout.html"],"app":"hiveblog/0.1"}
created2020-06-07 22:07:27
last_update2020-06-07 22:07:45
depth1
children1
last_payout2020-06-14 22:07:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length230
author_reputation330,357,940,720,833
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,831,742
net_rshares0
@themarkymark · (edited)
I agree.  I'm having regrets myself.   I've been wanting off Windows so bad since 10 but neither option really works. 
properties (22)
authorthemarkymark
permlinkre-transisto-qbku5k
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.05.5"}
created2020-06-07 22:22:33
last_update2020-06-07 22:23:06
depth2
children0
last_payout2020-06-14 22:22:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length118
author_reputation1,774,203,094,422,489
root_title"How to install & upgrade Windows Subsystem for Linux 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,831,906
net_rshares0