In our main Windows 11 review, published earlier this week, we covered most of the new features and design decisions in Microsoft’s newest consumer operating system – and it makes sense to characterize the overall impression there as “lukewarm”. The good news: We still hadn’t covered the best part of Windows 11 – Linux.
For years, the Windows Subsystem for Linux has made life easier for Windows 10 developers, system administrators and hobbyists who have one foot in the Windows world and one foot in the Linux world. But the WSL, practical as it is, has been hampered by several things that it could not to do. Installing WSL has never been easier than it should – and getting graphical apps up and running has always been in the past possible but a pain in the bum that required some pretty obscure third-party software.
Windows 11 finally fixes both of these problems. The Windows subsystem for Linux is not Perfect on Windows 11 – but it’s a huge improvement over what came before.
Install WSL on Windows 11
Microsoft has traditionally made installing WSL more of a chore than it should be, but the company finally got the process right in Windows 10 Build 2004. Just open an elevated command prompt (Start -> Type
cmd -> click
Run as Administrator), Type
wsl --install at the command prompt and you’re good to go. Fortunately, Windows 11 continues this process unchanged.
A simple one
wsl --install Without further argument, you get Hyper-V and the other basics of WSL, along with the latest version of Ubuntu. If you’re not a Ubuntu fanatic, the command can help you see what other easy-to-install distributions are available
wsl --list --online. If you prefer another distribution, you can install it with for example instead
wsl --install -d openSUSE-42.
If you’re not sure which Ubuntu distro to prefer, don’t worry. You can install as many as you want just by repeating
wsl --list --online to enumerate your options and
wsl --install -d distroname install what you want.
Installing a second distribution does not uninstall the first – it creates a separate environment that is independent of all others. You can run as many of these installed environments as you want at the same time without fear of one messing up the other.
WSL now supports graphics and sound
In addition to the simple installation, WSL offers support for graphics and audio in WSL apps under Windows 11. This is not exactly a premiere – Microsoft introduced WSLg in April with Windows 10 Insider Build 21364. But Windows 11 is the first production Windows build with WSLg support.
If this is your first time hearing about WSLg, the short version is simple: you can install GUI apps – for example Firefox – from your Ubuntu (or other distribution) command line and they’ll work as expected, including sound. When I installed WSLg on Windows 11 on the Framework laptop,
firefox the iconic browser opened automatically from the Ubuntu terminal. The YouTube headline also worked perfectly, neither with frame drops in the video nor with glitches in the audio.
If you are looking for how WSLg works, we can also help you get started here: Microsoft has decided to go into the future and use the Wayland protocol instead of the aging X11 / xorg. So that everything worked, the graphical interface had to be created on the Weston reference compositor for Wayland, which is connected to XWayland to support X clients, with FreeRDP providing the connectivity between the native Windows system and the X / Wayland apps, which run under WSLg.
If you want to dig deeper into the hairy details of WSLg’s architecture, we recommend Microsoft’s own April 19th devblog post on the very same topic.
What can I do with WSLg on Windows 11?
One of the most frequently asked questions about WSLg can be phrased as follows: “Why bother?” This is because most of the GUI killer apps in the Linux world aren’t actually Linux-specific – the vast majority have already been ported directly to the Windows platform. And for these apps, it makes more sense to run the Windows native ports frequently.
That being said, there is an obvious “killer app” for WSLg that we are excited about – and that is
virt-manager, the virtualization management tool developed by RedHat.
virt-manager is a simple tool that streamlines the creation, management, and operation of virtual machines using the Linux kernel virtual machine.
virt-manager, you’ll see a simple list of your VMs along with their disk, network, and CPU activity. You can also manipulate your virtual “hardware” – eg by adding or removing RAM, “hard disks”, network interfaces and more – and starting, pausing or stopping it. Creating and destroying VMs is as easy as managing – and eventually
virt-manager allows you to drag a graphical console directly into any VM that behaves just like a physical display connected to a bare metal machine.
If all of this only worked on the local host, it would be pretty useless under WSLg. Nested virtualization is a thing, but it’s generally not something you want to do in production. However,
virt-manager allows you to manage the VMs on any Machine that you can SSH to, not just the local host. In practice, I use this remote management function to manage many dozen hosts (and several thousand VMs) both locally and remotely every day.
virt-manager never got a windows port and it seems unlikely. But it runs like a champion under WSLg. In the screenshots above you can see my Framework laptop running
virt-manager under WSLg, connected to my Ubuntu workstation via SSH. A multitude of VMs are installed and running on the Ubuntu workstation – and
virt-manager on my framework laptop, it can manage all of them including the Hackintosh VM and the Windows Server 2012 R2 VM with console windows open.
The icing on this virtualization cake is how Good These console windows work – I had no problem getting a flawless YouTube playback on my Hackintosh VM console, complete with working, glitch-free audio. Ironically, this is a better remote control experience than I can manage with mine real Macbook Air – which is unbearable for spreadsheets as it is limited to VNC over Wi-Fi by itself.
What tilt do I use WSLg on Windows 11?
As much as we love the extended Windows subsystem for Linux functionality in Windows 11, it is still not a “real” Linux VM.
As far as I can tell, there is still no network bridge mode – which means it is difficult to run a network server application (Apache, Nginx, MySQL, Samba, etc.) on your WSLg guest and serve its services to other machines in the Network available. This self-described “hilariously unsupported, unsanctioned, and experimental” workaround still seems the closest thing to a real network bridge – which greatly limits the usefulness of WSL-based application servers.
You can’t run the GNOME Software Center app under WSLg – more specifically, you can install and run, but it’s effectively useless. We’re not sure what’s going wrong with Software Center, but a “Connection Failed” message appears
upower“Error on console and not listing available applications. Not all of ours were listed either Set up Applications! This is a shame because otherwise it would have been a good way for Linux newcomers to Windows to browse the software available for their new WSLg distribution.
You also cannot run the GNOME Shell desktop environment under WSLg itself. To run
apt install gnome-shell works well, and draws in the enormous list of dependencies required to meet this requirement – but
gnome-shell itself fails shamefully with
unsupported session typewhich effectively means it doesn’t like WSLg’s Weston / XWayland environment.
Finally, it lacks Ubuntu’s excellent built-in OpenZFS support. You can
apt install zfsutils-linux without difficulty, but this package depends on Canonical’s in-house kernel with built-in ZFS support, which Microsoft did not include in its own WSL2 kernel.
Determined Ubuntu users still can
apt install zfs-fuse and expect the user-mode implementation to work as well as it does on native Ubuntu – but we don’t recommend it for production; the FUSE implementation is still hanging on 0.7.0 while the in-kernel version is 0.8.3. This means a lack of support for native ZFS encryption, along with a slew of other features, bug fixes, and improvements – not to mention the performance impact running on FUSE rather than the kernel.
We have not tested DKMS-based implementations of in-kernel ZFS as typically used in RHEL-based distributions.
If you are already a Windows Subsystem for Linux (WSL) user, Windows 11 offers a vastly improved experience compared to what you are used to from Windows 10. It is easier to install, has more functionality, and offers better desktop integration than older workarounds like running MobaXTerm’s X11 server.
As a die-hard desktop Linux user myself, the new WSLg functionality is nowhere near enough to make me go back to Windows on the desktop. But it removes many pain points for other Linux users who are “trapped” at work in Windows land, and provides the easiest way for newbies to get wet feet and try new things.
We particularly appreciate Microsoft’s forward-looking approach to standardizing on Weston / Wayland instead of an X server – and their obvious determination, really integrate right with the open source stack that traditional desktop Linux is based on.
If you still don’t know if or when to bother with a Windows 11 upgrade, the new and improved WSL may be your best reason to take the plunge now.
Offer image from haru__q / Flickr