The famous Windows Subsystem for Linux 2 (WSL2) begins roll out via Windows Insider previews.
Those are not aware, Windows Subsystem for Linux is a Microsoft strategy to bring the ability to run GNU/Linux application inside Windows without the virtual machines. The important aspect is, you can run the GNU/Linux applications unmodified and you do not need to configure it for Windows – that means you do not need Windows installers either. Currently Windows 10 have the tested Linux distributions available to install via Microsoft Store including Ubuntu, Kali Linux.
WSL1 and WSL2 Comparision
WSL initially announced during 2016 for its availability. Since then numerous improvements, ideas have been put in which brings us WSL2 with a full and real Linux Kernel.
WSL2 has started rolling out for Windows Insider Fast Rings (Windows build 18917).
Major Changes in WSL2
Keep files in Linux Root file system
When WSL1 launched, to access the files from Linux under Windows, you had to keep them in C Drive. But from WSL2, you can keep the files in Linux root folder for faster access.
Access Linux Files from Windows Apps
With WSL2, you can directly access Linux files via Windows Explorers. Simply open the bash shell and run
Linux Network Applications with Dynamic IP Address
WSL2 comes with a major architectural change – that is – it uses virtualization technology. The networking support in WSL2 still being worked on. However, you can access Linux networking applications by using VM’s IP address of Windows. Work is underway to access network applications using ‘localhost’ and would be available in future as per the road map.
WSL 2 Architecture
New WSL Commands
Bunch of new shell commands are available with WSL2 which definitely helps users, developers to control the WSL versions (WSL1 and WSL2) and distributions.
wsl --set-version <Distro> <Version>
Use this command to convert a distro to use the WSL 2 architecture or use the WSL 1 architecture.
: the specific Linux distro (e.g. “Ubuntu”)\
: 1 or 2 (for WSL 1 or 2)
wsl --set-default-version <Version>
Changes the default install version (WSL 1 or 2) for new distributions.
Immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine.
wsl --list --quiet
Only list the distribution names.
wsl --list --verbose
Shows detailed information about all the distributions.
If you have registered for Windows Insider preview, you can go ahead and try WSL2.
You can follow the development and report bugs @ GitHUB for WSL.
Via – MS Blogs
Want to learn more about Windows Subsystem for Linux? Check out below hour long video!
For the latest tutorials, app reviews and how-to guides, follow debugpoint on Twitter, Facebook, and subscribe to our YouTube channel.