2019-11-01

wsl - WSL 2 is only available in Windows 10 builds 18917 or higher


WSL 2 is only available in Windows 10 builds 18917 or higher
https://docs.microsoft.com/en-us/windows/wsl/wsl2-install


1. Ensure that you are running Windows 10 build 18917 or higher
To make sure you are using build 18917 or higher please join the Windows Insider Program and select the 'Fast' ring. https://insider.windows.com/en-us/

C:\Users\slitaz>ver

Microsoft Windows [Version 10.0.18980.1]


2. Enable the ‘Virtual Machine Platform’ and ‘Windows Subsystem for Linux’
Control Panel → Programs → Turn Windows features on or off


3. Open the Microsoft Store and choose your favorite Linux distribution.


From the distro's page, select "Get"



4. Initializing a newly installed distro
To complete the initialization of your newly installed distro, launch a new instance. You can do this by clicking the "launch" button in the Microsoft Store app, or launching the distro from the Start menu.
https://docs.microsoft.com/en-us/windows/wsl/initialize-distro

Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: tux
New password:
Retype new password:
passwd: password updated successfully
Installation successful!

tux@slitaz:~$ uname -a
Linux slitaz 4.4.0-18980-Microsoft #1-Microsoft Sat Sep 07 13:01:00 PST 2019 x86_64 GNU/Linux

tux@slitaz:~$ free -m
total used free shared buff/cache available
Mem: 8058 3205 4629 17 223 4722
Swap: 7153 1 7152

tux@slitaz:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 56G 25G 32G 45% /
none 56G 25G 32G 45% /dev
none 56G 25G 32G 45% /run
none 56G 25G 32G 45% /run/lock
none 56G 25G 32G 45% /run/shm
none 56G 25G 32G 45% /run/user
tmpfs 56G 25G 32G 45% /sys/fs/cgroup
C:\ 56G 25G 32G 45% /mnt/c


tux@slitaz:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
tux@slitaz:~$



5. Set a distro to be backed by WSL 2

Microsoft Windows [Version 10.0.18980.1]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\slitaz>wsl -l -v
NAME STATE VERSION
* Debian Stopped 1

C:\Users\slitaz>wsl uname -a
Linux slitaz 4.4.0-18980-Microsoft #1-Microsoft Sat Sep 07 13:01:00 PST 2019 x86_64 GNU/Linux

C:\Users\slitaz>wsl --set-version Debian 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.

C:\Users\slitaz>wsl -l -v
NAME STATE VERSION
* Debian Stopped 2

C:\Users\slitaz>debian.exe
tux@slitaz:~$ uname -a
Linux slitaz 4.19.67-microsoft-standard #1 SMP Sun Aug 18 13:37:54 UTC 2019 x86_64 GNU/Linux
tux@slitaz:~$