WSL is a very useful tool for developers. Windows 11 was already released on Oct, 5th. Then, what's new with WSL on Windows 11? This post from MiniTool Partition Wizard will tell you the answer.
What Is WSL?
The Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment directly on Windows, without the overhead of a traditional virtual machine or dualboot setup. For developers, this is very useful. They can:
- Choose the favorite GNU/Linux distributions from the Microsoft Store.
- Run common command-line tools such as grep, sed, awk, or other ELF-64 binaries.
- Run Bash shell scripts and GNU/Linux command-line applications including: vim, emacs, tmux, NodeJS, Javascript, Python, Ruby, C/C++, C# & F#, Rust, Go, SHD, MySQL, Apache, lighttpd, MongoDB, PostgreSQL, etc.
- Install additional software using your own GNU/Linux distribution package manager.
- Invoke Windows applications using a Unix-like command-line shell.
- Invoke GNU/Linux applications on Windows.
In 2020, WSL 2 was released. This version increases file system performance, as well as adding full system call compatibility. In addition, the new version can run ELF64 Linux binaries on Windows.
Windows 10’s WSL 2 Lets Custom Addition of the Linux Kernel
What’s New with WSL on Windows 11?
Windows 11 uses WSL 2 and therefore it has advantages of WSL 2, although these changes are not unique to Windows 11 (WSL 2 was released with Windows 10 build 2004). Comparing to traditional WSL, WSL on Windows 11 has the following advantages.
1. Simplified installation
If you are running Windows 10 2004 (19042 build) or earlier versions, to install WSL2, you need to enable WSL 1 through the “Windows Features” interface, enable the virtualization platform, and download an update for the kernel to switch to WSL 2.
Guide to Install Windows Subsystem for Linux (WSL) in Win 10
But if you are running Windows 10 2004 or higher versions, or Windows 11, you can install and update WSL 2 through just the following two commands: wsl –install and wsl –update.
This will install Ubuntu be default. If you don’t like this, you can use wsl –install -d <Distribution Name> to install another one. If you don’t which one to install, you can use wsl –list –online to view all the available distributions that you can get on Windows 11.
How to Install Windows Subsystem for Linux (WSL) on Windows 11
2. Support for both graphics and audio
WSL on Windows 11 supports WSLg. With it, you can install GUI apps—for example, Firefox—from your Ubuntu (or other distro) command line, and they’ll work as expected, including sound.
3. Access to Linux file systems
WSL on Windows 11 can attach and mount a drive to access Linux file systems not supported on Windows 11. To do that, you just need to run wmic diskdrive list brief to determine the disk you want to mount, and then run wsl –mount \.physicaldrivepath –partition 1 to mount the first partition using the ext4 file system of the physical drive.
Once the drive is mounted, you can always access the file from File Explorer using the \wsl.localhostdistronamemountpoint command.
Of course, there are other new features. But I think the above 3 are the most important ones.