You are not logged in.
Pages: 1
Windows Subsystem for Linux: WSL 2!
https://devblogs.microsoft.com/commandline/announcing-wsl-2/
Microsoft will be shipping a Linux kernel with Windows
runwsl.gif (2.0 MB)
https://devblogs.microsoft.com/commandline/wp-content/uploads/sites/33/2019/05/runwsl.gif
[attachment=47912,2846]
Offline
wsl-debian-gnulinux
tux@slitaz:~$ uname -a
Linux slitaz 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 GNU/Linux
tux@slitaz:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 50G 22G 28G 44% /
none 50G 22G 28G 44% /dev
none 50G 22G 28G 44% /run
none 50G 22G 28G 44% /run/lock
none 50G 22G 28G 44% /run/shm
none 50G 22G 28G 44% /run/user
cgroup 50G 22G 28G 44% /sys/fs/cgroup
C:\ 50G 22G 28G 44% /mnt/c
tux@slitaz:~$ free -m
total used free shared buff/cache available
Mem: 4095 1399 2472 17 223 2565
Swap: 6327 0 6327
tux@slitaz:~$ date
Tue Oct 8 17:40:11 CST 2019
tux@slitaz:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
tux@slitaz:~$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Debian GLIBC 2.24-11+deb9u3) stable release version 2.24, by Roland McGrath et al.
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 6.3.0 20170516.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
tux@slitaz:~$
[attachment=47913,2847]
Offline
wsl-apt
tux@slitaz:~$ uname -a
Linux slitaz 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 GNU/Linux
tux@slitaz:~$ sudo apt-get install figlet
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
figlet
0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
Need to get 136 kB of archives.
After this operation, 751 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 figlet amd64 2.2.5-2+b1 [136 kB]
Fetched 136 kB in 0s (265 kB/s)
Selecting previously unselected package figlet.
(Reading database ... 9689 files and directories currently installed.)
Preparing to unpack .../figlet_2.2.5-2+b1_amd64.deb ...
Unpacking figlet (2.2.5-2+b1) ...
Setting up figlet (2.2.5-2+b1) ...
update-alternatives: using /usr/bin/figlet-figlet to provide /usr/bin/figlet (figlet) in auto mode
tux@slitaz:~$ figlet WSL 2 IS AWESOME
__ ______ _ ____ ___ ____
\ \ / / ___|| | |___ \ |_ _/ ___|
\ \ /\ / /\___ \| | __) | | |\___ \
\ V V / ___) | |___ / __/ | | ___) |
\_/\_/ |____/|_____| |_____| |___|____/
___ _______ ____ ___ __ __ _____
/ \ \ / / ____/ ___| / _ \| \/ | ____|
/ _ \ \ /\ / /| _| \___ \| | | | |\/| | _|
/ ___ \ V V / | |___ ___) | |_| | | | | |___
/_/ \_\_/\_/ |_____|____/ \___/|_| |_|_____|
[attachment=47925,2850]
Offline
wsl-ubuntu-1804
tux@slitaz:~$ uname -a
Linux slitaz 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
tux@slitaz:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
tux@slitaz:~$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27.
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 7.3.0.
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
tux@slitaz:~$
[attachment=47939,2851]
Offline
wsl-slitaz-base
root@slitaz:~# uname -a
Linux slitaz 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 GNU/Linux
root@slitaz:~# cat /etc/os-release
PRETTY_NAME="SliTaz GNU/Linux 5.0"
NAME="SliTaz GNU/Linux"
VERSION_ID="5.0"
VERSION="5.0"
ID=slitaz
HOME_URL="http://www.slitaz.org/"
SUPPORT_URL="http://www.slitaz.org/en/support.php"
BUG_REPORT_URL="http://bugs.slitaz.org/"
root@slitaz:~# /lib/libc.so.6
GNU C Library (GNU libc) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.9.2.
Compiled on a Linux 3.16.36 system on 2016-09-08.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
root@slitaz:~# slitaz
SliTaz GNU/Linux
================================================================================
Release : 5.0
Architecture : x86_64
Kernel : 4.4.0-18362-Microsoft
Machine type : x86_64
Home path : /home/slitaz
Configs : /etc/slitaz
Main config : /etc/slitaz/slitaz.conf
Log files : /var/log/slitaz
Packages DB : /var/lib/tazpkg
Installed : 6 packages
Mirror : /var/www/packages/
System date : Thu Oct 17 09:17:00 UTC 2019
--------------
Boot options : BOOT_IMAGE=/kernel init=/init
================================================================================
root@slitaz:~#
root@slitaz:~# uname -a
Linux slitaz 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 GNU/Linux
root@slitaz:~# tazpkg -l
List of all installed packages
================================================================================
busybox 1.23.2 base-system
gettext-base 0.19.4 base-system
glibc-base 2.19 base-system
ncurses-common 5.9 base-system
slitaz-base-files 309 base-system
tazpkg 5.3.3 base-system
================================================================================
6 packages installed.
root@slitaz:~# cat /var/lib/tazpkg/installed.md5
520ba50265bdc3eebfe08357143a78ff glibc-base-2.19-x86_64.tazpkg
2cb8d47efc737e788ae8a9b06c495b9d tazpkg-5.3.3-x86_64.tazpkg
f03c6128eff3ee8bf75f29aefaed7a02 gettext-base-0.19.4-x86_64.tazpkg
e957b52454db2a1945083fb4b5616a02 busybox-1.23.2-x86_64.tazpkg
865c9ba69d16c7f0ac942422fc56fc73 slitaz-base-files-309-x86_64.tazpkg
29bcd51e983368248c275b5ae92017c6 ncurses-common-5.9-x86_64.tazpkg
root@slitaz:~# tazpkg info tazpkg
TazPKG information
================================================================================
Package : tazpkg
Version : 5.3.3
Category : base-system
Short desc : SliTaz packages manager.
Maintainer : pankso@slitaz.org
License : GPL3
Depends : busybox gettext-base
Build deps : gettext
Web site : http://www.slitaz.org/
================================================================================
root@slitaz:~# du -sh /
8.3M /
root@slitaz:~#
[attachment=47944,2854] [attachment=47944,2855]
Offline
Windows 10 18362.418
Microsoft Windows [Version 10.0.18362.418]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\WIN10>ver
Microsoft Windows [Version 10.0.18362.418]
C:\Users\WIN10>
Windows 10 current versions by servicing option
https://docs.microsoft.com/en-us/windows/release-information/
(All dates are listed in ISO 8601 format: YYYY-MM-DD)
Last Updated: 2019-10-15
Semi-Annual Channel
[attachment=47965,2858]
Offline
Insider Preview Build 18980
Microsoft Windows [Version 10.0.18980.1]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\slitaz>ver
Microsoft Windows [Version 10.0.18980.1]
C:\Users\slitaz>
In-development builds of Windows 10 (20H1)
https://docs.microsoft.com/en-us/windows-insider/flight-hub
You can get builds of 20H1 today if you've opted into the Fast ring.
The items in bold are the latest releases for the individual versions of the item.
[attachment=47966,2860]
Offline
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
[attachment=48006,2869]
3. Open the Microsoft Store and choose your favorite Linux distribution.
[attachment=48006,2870]
From the distro's page, select "Get"
[attachment=48006,2871]
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:~$
[attachment=48006,2872]
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:~$
[attachment=48006,2873]
Offline
Start WSL
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.
1. Launch WSL
clicking the "launch" button in the Microsoft Store app
[attachment=48013,2874]
or
Start menu → Debian
[attachment=48013,2875]
2. Command Prompt
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 2
C:\Users\slitaz>Debian
tux@slitaz:~$ exit
C:\Users\slitaz>wsl
tux@slitaz:/mnt/c/Users/slitaz$ exit
logout
C:\Users\slitaz>bash
tux@slitaz:/mnt/c/Users/slitaz$ exit
logout
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:~$ exit
logout
C:\Users\slitaz>
Offline
WSL2 - kernel 4.19.67
Linux slitaz 4.19.67-microsoft-standard #1 SMP Sun Aug 18 13:37:54 UTC 2019 x86_64 GNU/Linux
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 2
C:\Users\slitaz>Debian
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:~$ 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:~$ dmesg
[ 0.000000] Linux version 4.19.67-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Sun Aug 18 13:37:54 UTC 2019
[ 0.000000] Command line: initrd=\initrd.img panic=-1 pty.legacy_count=0 nr_cpus=2
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Enabled xstate features 0x3, context size is 576 bytes, using 'standard' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000e0fff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000001fffff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x0000000000200000-0x00000000f7ffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000001bf9fffff] usable
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] DMI not present or invalid.
[ 0.000000] Hypervisor detected: Microsoft Hyper-V
[ 0.000000] Hyper-V: features 0x2e7f, hints 0x62c2c
[ 0.000000] Hyper-V Host Build:18980-10.0-0-0.1
[ 0.000000] Hyper-V: LAPIC Timer Frequency: 0x1e8480
[ 0.000000] tsc: Marking TSC unstable due to running on Hyper-V
[ 0.000000] Hyper-V: Using hypercall for remote TLB flush
….
[ 2.582158] FS-Cache: N-cookie d=00000000a7745499 n=00000000e389a659
[ 2.582158] FS-Cache: N-key=[10] '34323934393337353335'
[ 49.261120] hv_balloon: Max. dynamic memory size: 7034 MB
tux@slitaz:
[attachment=48014,2876]
Offline
WSL1 VS. WSL2
Linux slitaz 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 GNU/Linux
Linux slitaz 4.4.0-18980-Microsoft #1-Microsoft Sat Sep 07 13:01:00 PST 2019 x86_64 GNU/Linux
Linux slitaz 4.19.67-microsoft-standard #1 SMP Sun Aug 18 13:37:54 UTC 2019 x86_64 GNU/Linux
----
4. WSL1
The original WSL is now known as WSL1. WSL1 is a compatibility layer for running Linux binary executables (ELF) natively on Windows 10. No re-compilation or 'porting' of applications is required. WSL1 provides a Linux-compatible kernel interface developed by Microsoft that allows a user to choose a Linux distribution to install from the Microsoft Store. WSL1 executes unmodified Linux ELF64 binaries by operating a Linux kernel interface on top of the Windows kernel in Windows 10. The WSL1 interface translates Linux system calls from the binaries into Windows system calls and then executes them at native speed. Linux applications run within the Linux distribution which provides the application's dependencies and package management in a container-like environment. WSL provides an interface to mount drives within WSL.
5. WSL2
WSL2 was announced at Microsoft Build 2019. WSL2 features a Linux kernel running inside Windows 10 and is built on the core technology of Hyper-V to provide better Linux application support and improved file performance. Transitioning from WSL2 is seamless. WSL2 is still in active development and is only available in Insider builds. These builds are not suitable for production devices and are not recommended for a user's primary machine. Instead, users can try WSL2 using Hypver-V or on a secondary machine.
Announcing WSL2 - Microsoft blog announcing WSL2
https://devblogs.microsoft.com/commandline/announcing-wsl-2/
The new Windows subsystem for Linux architecture: a deep dive - WSL2 presentation at Microsoft Build 2019
https://www.youtube.com/watch?v=lwhMThePdIo
WSL2-Linux-Kernel - The source for the Linux kernel used in Windows Subsystem for Linux 2.
https://github.com/microsoft/WSL2-Linux-Kernel
https://github.com/sirredbeard/Awesome-WSL
[attachment=48040,2880]
https://www.youtube.com/watch?v=lwhMThePdIo
Offline
demo of WSL2 - runwsl.gif (2.0 MB)
runwsl.gif (2.0 MB)
https://devblogs.microsoft.com/commandline/wp-content/uploads/sites/33/2019/05/runwsl.gif
Here’s a quick demo of WSL 2 in action. When we start our distro we get access to a working bash shell in under two seconds, and can run services and apps like docker right away. To summarize: while WSL 2 does use a VM, it will be managed and run behind the scenes leaving you with the same user experience as WSL 1.
https://devblogs.microsoft.com/commandline/announcing-wsl-2/
1. launch ubuntu from windows10
2. start docker service
3. run alpine docker
4. ls alpine filesystem
5. show alpine-release
6. figlet WSL 2 IS AWESOME!
Total 23 seconds.
Offline
WSL2 will be our best chance.
Are we ready ?
Offline
Pages: 1
[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.6 MiB (Peak: 1.77 MiB) ]