Last time Microsoft has been actively involved in supporting the Linux kernel and GNU software components. It all started with financial assistance, and now in Windows 10 there is an opportunity to install the GNU/Linux distribution. In this article we will show you how to enable Windows subsystem for Linux.
What is Windows Subsystem for Linux?
Typically, users have difficulties when completing certain tasks in Windows 10 compared to GNU/Linux. For example, using the password manager “Password Store”. It works perfectly on GNU/Linux and Android, but for Windows it is not supported. And the program is really worth it, because it is encrypted with the RSA algorithm and the GPG private key. In this case, installing the distribution kit in Windows saves the situation and allows you to manage passwords in this program, albeit with some inconvenience, which cannot be avoided.
Enable Windows 10 Linux Subsystem
First, you need to activate the developer mode. To do this, open PC Settings → “Update & Security”, go to the “For developers” menu and select “Developer mode”.
Then you need to add the GNU/Linux components. Open “Control Panel” → “All Control Panel Items” → “Programs and features” and go to the “Turn Windows features on or off” menu.
In the list of components, select “Windows Subsystem for Linux” and click OK.
Also, the entire procedure above can be performed in one line in PowerShell:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
After that reboot the PC.
Install and Configure the GNU/Linux Distribution
Now, several distributions available for installation are in the Microsoft Store, such as Ubuntu, SUSE Linux Enterprise, and others.
Open the one you need (for example, Debian) and click “Get”.
The download process will begin. Wait until this operation is completed.
After that, run the distribution as a regular application.
A window will appear where installation of the downloaded system will begin. It will also take some time.
Then a prompt to create a new user will appear. Enter the username and password. After that, inputting of commands in the terminal will be available.
Bash on Windows 10
Enabling developer mode will also install the Bash command shell, which can be launched and used for some needs in Windows 10, including installing/removing programs from standard repositories.
In addition, the default directory is System32, like the Windows command prompt, and not the user’s home directory.
Of course, you cannot run Windows applications in it, but you can run bat scripts and commands written in PowerShell.
Bash works with the clipboard of an external system. To copy text from it, select it with the mouse and press Ctrl + Shift + C. In Windows, paste in a convenient way. And to insert text into Bash from Windows, use the right mouse button.