In our main Windows 11 review posted earlier this week, we covered the majority of new features and design decisions in Microsoft’s newest consumer OS—and it feels reasonable to characterize the overall impression given there as “lukewarm.” The good news is that we still hadn’t covered the best part of Windows 11: Linux.
For years now, Windows 10’s Windows Subsystem for Linux has been making life easier for developers, sysadmins, and hobbyists who have one foot in the Windows world and one foot in the Linux world. But WSL, handy as it is, has been hobbled by several things it could not do. Installing WSL has never been as easy as it should be—and getting graphical apps to work has historically been possible but also a pain in the butt that required some fairly obscure third-party software.
Windows 11 finally fixes both of those problems. The Windows Subsystem for Linux isn’t perfect on Windows 11, but it’s a huge improvement over what came before.
Installing WSL on Windows 11
Microsoft has traditionally made installing WSL more of a hassle 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 prompt, and you’re good to go. Windows 11, thankfully, carries this process forward unchanged.
wsl --install with no further arguments gets you Hyper-V and the other underpinnings of WSL, along with the current version of Ubuntu. If you aren’t an Ubuntu fan, you can see what other easily installable distributions are available with the command
wsl --list --online. If you decide you’d prefer a different distro, you can install it instead with—for example—
wsl --install -d openSUSE-42.
If you’re not sure which distribution you prefer, don’t fret. You can install as many as you like, simply by repeating
wsl --list --online to enumerate your options and
wsl --install -d distroname to install whichever you like.
Installing a second distribution doesn’t uninstall the first; it creates a separate environment, independent of any others. You can run as many of these installed environments as you like simultaneously, without fear of one messing up another.
WSL now supports graphics and sound
In addition to easy installation, WSL on Windows 11 brings support for both graphics and audio in WSL apps. This isn’t exactly a first—Microsoft debuted 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 of WSLg, the short version is simple: you can install GUI apps—for example, Firefox—from your Ubuntu (or other distro) command line, and they’ll work as expected, including sound. When I installed WSLg on Windows 11 on the Framework laptop, running
firefox from the Ubuntu terminal popped up the iconic browser automatically. Heading to YouTube in it worked perfectly, too, with neither frame drops in the video nor glitches in the audio.
If you’re looking for how WSLg works, we can get you started there also: Microsoft decided to go future-forward and build using the Wayland protocol rather than the increasingly elderly X11/xorg. To make it all work, this meant building the graphical interface on the Weston reference compositor for Wayland, hitched to XWayland to support X clients, with FreeRDP providing connectivity between the native Windows system and the X/Wayland apps running under WSLg.
If you want to dig further into the hairy details of WSLg’s architecture, we highly recommend Microsoft’s own April 19 devblog post on exactly that topic.
What can I do with WSLg on Windows 11?
One of the most repeated questions we’ve seen about WSLg can be expressed as “why bother?” This is because the majority of GUI “killer apps” in the Linux world aren’t really Linux-specific—the vast majority have already been ported directly to the Windows platform. And for those apps, running the native Windows ports frequently makes more sense.
With that said, there is one obvious “killer app” for WSLg that has us excited—and that’s
virt-manager, the RedHat-originated virtualization management tool.
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 can see a simple list of your VMs along with how much disk, network, and CPU activity is currently associated with each. You can also manipulate their virtual “hardware”—e.g., by adding or removing RAM, “disks”, network interfaces, and more—and start, pause, or stop them. Creation and destruction of VMs is as easy as management—and, finally,
virt-manager allows you to pull a graphical console directly into each VM, which behaves just as a physical display connected to a bare-metal machine would.
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 you can SSH to, not just the local host. In practice, I use this remote management feature to manage many tens of hosts (and a few thousand VMs), both local and remote, on a day-to-day basis.
virt-manager never got a Windows port and seems unlikely to. But it runs under WSLg like a champ. In the screenshots above, you can see my Framework laptop running
virt-manager under WSLg, connected via SSH to my Ubuntu workstation. The Ubuntu workstation has a variety of VMs installed and running—and
virt-manager on my Framework laptop can manage them all, including the Hackintosh VM and Windows Server 2012 R2 VM it has console windows open to.
The cherry on top of this virtualization cake is just how well those console windows work—I had no trouble getting 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 my real Macbook Air—which is unbearable to use for so much as spreadsheet work, thanks to it being limited to VNC over Wi-Fi.
What can’t I do with WSLg on Windows 11?
As much as we’re loving the enhanced Windows Subsystem for Linux functionality in Windows 11, it’s still not quite a “real” Linux VM.
As far as I can tell, there’s still no networking bridge mode—which means it’s difficult to run a network server application (Apache, Nginx, MySQL, Samba, etc) on your WSLg guest and expose its services to other machines on the network. This self-described “hilariously unsupported, unapproved, and experimental” workaround still seems to be the closest thing to a real network bridge available—which sharply limits the usability of WSL-based application servers.
You can’t run GNOME’s Software Center app under WSLg—more accurately, you can install and run it, but it’s effectively useless. We’re not sure exactly what goes wrong with Software Center, but it pops a “failed to connect to
upower” error on the console and fails to list any available applications. It also didn’t list all of our installed applications! This is a shame, as it otherwise would have been a nice way for Windows-using Linux newbies to browse the software available for their new WSLg distribution.
You also can’t run the GNOME shell desktop environment itself under WSLg. Running
apt install gnome-shell works fine and pulls in the enormous list of dependencies necessary to satisfy that request—but
gnome-shell itself fails ignominiously with
unsupported session type, which effectively means it doesn’t like WSLg’s Weston/XWayland environment.
Finally, Ubuntu’s excellent baked-in OpenZFS support is missing. You can
apt install zfsutils-linux without difficulty, but that package depends on Canonical’s in-house kernel with built-in ZFS support, which Microsoft has not picked up in its own WSL2 kernel.