Why Install Windows Subsystem for Linux?
It seems contradictory to install one operating system (OS) inside another. What’s the point? And why Linux? We can think of six reasons to use Linux in Windows off the top of our heads.
1. Windows Subsystem for Linux is Free and Easy
The most obvious answer is that Linux is free. But what good is something free if it’s hard to use? The good news is that Windows Subsystem for Linux (WSL) is easy, simple, and fast to install or uninstall, so it’s worth trying if you’re just curious about Linux.
2. Windows Subsystem for Linux Doesn’t Require a Virtual Machine
If you don’t want to install a virtual machine (VM) host like Hyper-V, VirtualBox, or VMWare, WSL is the way to go. It takes up less space and resources like CPU and RAM too.
3. Windows Subsystem for Linux Can Use Many Linux Distributions
At the time of writing, 17 Linux distributions (or “distros”) were available in the Microsoft Store. These include different versions and variations of Ubuntu Desktop and Server, Debian, Kali, SUSE Linux Enterprise Server, OpenSUSE, and Oracle Linux.
You also can use the following PowerShell command to see all available distros:
wsl –list –online
4. Windows Subsystem for Linux for Career Development
You could learn about Linux and various Linux distros like Ubuntu, Debian GNU/Linux, Kali, and Alpine WSL for work or school. Linux has a significant market share of servers, and more organizations are using Linux for the desktop. Students can use it for tutorials instead of going to the computer lab. Security researchers can use Kali and other Linux hacking distros and its many included tools. Many web developers, programmers, and artificial intelligence researchers may use Debian or Alpine WSL as their development environment as they have built-in developer tools.
5. Windows Subsystem for Linux for Open Source Apps
Most open-source software (OSS) is developed first for a Linux environment. As a result, OSS is becoming the standard in several industries, like game development, graphic design, and Internet of Things (IoT) embedded systems.
Consider all the open source software, which is often free. Wish you had Photoshop? Consider using GIMP. Want to learn CAD but can’t afford AutoCAD? Try OpenSCAD. Want to take your video editing to the next level, but Adobe Premiere is out of reach? Linux has Openshot.
Even more impressive is that you can run these Linux GUI apps in their windows as if they were Windows apps. There’s no need for a separate virtual machine in Hyper-V, VirtualBox, or a second physical computer. You could use Visual Studio in Windows and do photo edits in GIMP on Linux without disturbing your workflow.
6. Windows Terminal Runs Multiple Distros at Once
If you’re a fan of Windows Terminal and its multi-tab feature, you’ll love that you can run several Linux distros simultaneously, each in its own tab.
Should I use WSL 1 or WSL 2?
There are two versions of WSL: WSL 1 and WSL 2. WSL defaults to version 2. That’s fine for most people. However, if you’re not sure your system can handle a full Linux kernel install, or you will not use things like Docker, then WSL 1 is fine.
The version is easy to update if you change your mind. As an administrator, open PowerShell or the Command line and use the following wsl.exe command:
wsl –set-default-version 2 or wsl –set-default-version 1
Install Windows Subsystem for Linux with PowerShell
You can install WSL with either PowerShell or the command line interface (CLI). If you haven’t learned PowerShell, that’s okay. The wsl.exe commands work in either.
If the wsl.exe help text shows, WSL is already installed.
It takes a few minutes to install and then prompts you to reboot Windows.
Note: This installs the bash shell for Ubuntu. It’s not the graphical user interface (GUI). There are additional steps and prerequisites to enable that. However, you can now use Linux bash shell commands on your Windows computer.
Install Windows Subsystem for Linux with Control Panel
The installation begins. When it’s done, the Windows needs to reboot your PC message shows. Select Restart now.
After the restart, open Ubuntu on Windows from the Start menu, or in PowerShell or Command Prompt, use the wsl.exe command.
How Do I Uninstall Windows Subsystem for Linux?
To remove WSL, you must uninstall any Linux operating systems first. You can then remove the supporting components in Windows. It’s easiest to do this through Windows settings.
How Do I Access the Linux File System from Windows?
Unlike using Linux in a virtual machine, it’s easy to access Windows files from Linux and vice versa.
Open File Explorer and select Linux in the navigation pane on the left. When moving files between Windows and Linux, make sure you use a copy, not the original. There are some filetype compatibility issues, and sometimes the file gets corrupted.
How to Fix the Error Message “\wsl.localhost is not accessible”
You may get this error the first time you open the Linux filesystem through File Explorer.
Windows treats this connection like a physical connection between Windows and Linux computers. So you must tell it the network exists and is accessible. You’ll do this through the Windows Registry. If you’re not comfortable working in the Registry, ask someone who is. A mistake in the Registry can cause Windows to stop working. Always make a backup of the Registry, too.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider/HwOrder
You can open the Ubuntu filesystem through Windows File Explorer now. If the error persists, restart Windows, and it should work.
How Do I Access the Windows File System from Linux?
cd users/username/documents If you need to access something else, just use cd and ls until you find it. Ensure you only copy files, not move them, due to the risk of corrupting the file.
What Else Can I Do With Windows Subsystem for Linux?
When you enable WSL, you’ve got an entire Linux environment on your Windows computer. Or maybe several Linux environments. Whatever you can think of doing in Linux, you can now do. Take a look at our Linux-related articles and tutorials to get some ideas.