The best part of Windows 11 is a redesigned Windows subsystem for Linux

Enlarge / Installing and using the Windows subsystem for Linux is easier and more productive on Windows 11 than it is on Windows 10.

Jim Salter

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 as easy as it should be – and getting graphical apps working has always been in the past possible but also a pain in the bum that required some pretty obscure third-party software.

Windows 11 finally fixes both 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 prompt and you’re good to go. Fortunately, Windows 11 continues this process unchanged.

A simple one wsl --install With no 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 fan, 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 insteadwsl --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 one; it creates a separate environment, independent of others. You can run as many of these installed environments as you want at the same time without worrying about 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.

With 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 drives”, network interfaces and more – and start, pause or stop 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.

But…

Regrettably, 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’s limited to VNC over Wi-Fi.

About Willie Ash

Check Also

Windows 11: The Ars Technica Test

Microsoft Microsoft wanted everyone to use Windows 10. Given the slow adoption of Windows 8 …

Leave a Reply

Your email address will not be published. Required fields are marked *