How to add Linux apps to Windows in just one easy step


Let’s face it: Not everyone wants to futz with Linux. But within Windows, playing around with Linux is becoming easier and easier—enough that you can get up and running with little more than a single command. In seconds, you can download, run, and even pin powerful Linux apps to your Windows desktop.

Instead of installing Linux within a partition or virtual machine, Windows uses the Windows Subsystem for Linux, added way back in 2016 as part of the Windows 10 Anniversary Update. You’ll hear more about this at the Microsoft Build conference this week, as Microsoft encourages developers to run Windows alongside WSL for development and even general use. It’s not exactly the same as running Linux in a virtual machine, but it’s getting closer and closer.

When the Windows Subsystem for Linux debuted in Windows 10 in 2016 it had somewhat limited, text-based capabilities. But in the upgrade to WSL2 in May 2020, Microsoft opened the door to more visually friendly GUI apps and even the ability to perform GUI computations. Essentially, Linux within Windows isn’t restricted to text any more.

That means that if you have a favorite Linux GUI app that’s written strictly for Linux, you can probably run it as part of Windows—i.e., launch the app from the Start menu, pin it to the taskbar, et cetera. That allows you to use a greater number of apps than any one OS offers, since you can use apps coded for Linux or Windows. This week, Microsoft seemed to indicate that these features would be released in Windows 10 21H1, the latest Windows feature update which has just begun rolling out. But the company clarified Tuesday that the feature is not being generally released in 21H1 and that it would have more information about general availability at a later date.

Unfortunately, that means that you’ll need to be part of the Windows 10 Insider program instead, running version preview build 21364 or higher. (Configuring your PC for Windows Subsystem for Linux previously required a special GPU driver, too: an Intel GPU driver, an AMD GPU driver, or an Nvidia GPU driver. We can’t confirm yet if those drivers ship with the Windows Insider build, so we’ve included them for reference.)

How to set up the Windows Subsystem for Linux in one command

About the only app you’ll need to launch to accomplish this task is Windows’ own PowerShell, which you can launch via the Start menu or just by typing PowerShell in the Windows search box. Be sure to click the “run as administrator” option that will appear to the right.

If you’ve never set up WSL before, it’s as easy as typing wsl —install -d Ubuntu into the resulting PowerShell window. That will load the necessary files as well as install the popular Ubuntu Linux distribution. You’ll also need to reboot your machine. Since Ubuntu runs as an OS, you’ll need to then choose a username and password specifically for Ubuntu. That’s it!

Microsoft windows subsystem for linux wsl wsl ubuntu setup 1 Mark Hachman / IDG

There’s also one annoying little trick that you’ll need to do each time you open PowerShell. By default, PowerShell opens into DOS. Type wsl to begin interacting with the Windows Subsystem for Linux. To exit out of WSL, type exit at the prompt.



Source link