Linux GUI Applications on Windows Subsystem for Linux
Linux GUI Applications on Windows Subsystem for Linux
Applications on
Windows Subsystem
for Linux [WSL2]
Developers Perspective
Jim McKeeth
Chief Developer Advocate
Embarcadero Technologies
[email protected]
@JimMcKeeth
● Introduced in Windows 10
○ Trivia: Replaces Windows Services for Unix from 2004
○ Also available on Windows 11 and Windows Server 2019
● Developed in collaboration with Canonical and others
● WSL2 improved performance with a real Linux kernel
○ Uses a subset of Hyper-V features
● Not as isolated or as much overhead as a VM
○ Performance rivals native Linux
● WSLg adds GUI support
○ Ships in Windows 11 or Windows 10 Insider 21364
Satya Nadella
Microsoft CEO
https://zd.net/3IQSst6
Mark Shuttleworth
Img https://w.wiki/4n9G Founder & CEO Canonical
Img https://w.wiki/4n9H
Copyright © 2022 by Embarcadero, an Idera company RAD STUDIO
Delphi 11
Benefits and Use Cases
● Ability to run unmodified ELF64 Linux binaries, expand toolkit and capabilities
● Flexibility of combining Windows and Linux tool chain on one computer
● Less overhead than a traditional virtual machine means better performance
● Local build environment with containers, etc.
● Testing server applications from Windows without additional infrastructure
● No need to mess with dual boot or 3rd party VM installation
● Invoke Linux binaries from Windows and Windows executables from Linux
● Runs as you need it, less management
● Memory and drive space are dynamically shared
https://docs.microsoft.com/en-us/windows/wsl/install
● Advanced WSL Launcher / Installer (Simplify making your own WSL distro)
○ https://github.com/yuk7/wsldl
● Other prebuilt distros based on WSLDL
○ https://wsldl-pg.github.io/docs/Using-wsldl/#distros
● Collection of WSL Utilities
○ https://github.com/wslutilities/wslu
● A GUI WSL2 instance manager
○ https://github.com/bostrot/wsl2-distro-manager
● Awesome list for WSL
○ https://github.com/sirredbeard/Awesome-WSL
○ From Ubuntu
Fedora ● Feature focus
● Free
■ sudo service docker start
■ sudo docker run -t dokken/centos-stream-9 bash ls /
■ dockerContainerID=$(sudo docker container ls -a | grep -i
dokken/centos-stream-9 | awk '{print $1}')
■ sudo docker export $dockerContainerID > /mnt/c/WSL/CentOS/centos.tar
■ sudo docker rm $dockerContainerID
● By Redhat
○ From PowerShell Redhat ●
●
Supported
Stable focus
● Commercial
■ cd C:\WSL\CentOS\
■ wsl --import CentOS C:\WSL\CentOS\ .\centos.tar
○ From CentOS
■ yum update -y && yum install passwd sudo -y
■ myUsername=jim
■ adduser -G wheel $myUsername
■ echo -e "[user]\ndefault=$myUsername" >> /etc/wsl.conf ● By community
■ passwd $myUsername CentOS ●
●
No support
Free
○ From PowerShell
■ wsl --terminate CentOS
Copyright © 2022 by Embarcadero, an Idera company Delphi 11
Q&A
Linux GUI
Applications on
Jim McKeeth
Windows Subsystem Chief Developer Advocate