Linux on Windows(WSL)

Ubuntu on Windows Microsoft Store download
Share:

What?

In this tutorial, we’ll be installing Linux on our Windows machine, by using the WSL feature(no VM or dual booting required). WSL(Windows subsystem for Linux) is a Windows 10 feature that provides you with a Bash shell, which you can use to execute Linux commands and run Linux applications. 

Why?

I needed Linux to compile the firmware for my quadcopter as the tools aren’t available for Windows. I use Windows as my main OS, but sometimes I do things that require Linux. WSL isn’t quite like having a proper Linux machine set up, but for me, it does seem to do the job most of the times. 

More about WSL.

How?

Here is quick, straight to the point tutorial on how to set it all up. 

First, go to the Microsoft store and search for Ubuntu. We’ll go with Ubuntu but you can experiment with other distribution available on the MS store. Just search for “Linux” and see what else is available.

 Click get, wait for it to install and launch it. 
Most likely you will be greeted with the following error: wslregisterdistribution failed with error: 0x8007019e. To fix this we need to enable the WSL(Windows subsystem for Linux) feature.
To do so, go to Windows features.
Tick the Windows subsystem for Linux option.
Click OK and wait for it to install. After a quick install, you will be prompted to restart your computer. 
After rebooting retry opening Ubuntu. If everything went right Linux should be getting installed automatically. After everything is done installing you will be prompted to create a user account 
Enter a username and password.
After that, your Linux installation should be ready to go.

Exchanging Files

 At some point, you will probably need to exchange some file between Windows and Linux. One way of doing that is going to the Linux installation folder with windows explorer. You can find the Linux install location at: C:\Users\”Windows User”\AppData\Local\lxss
But using file explorer to access the Linux installation folders isn’t the best way of doing things. Instead, you should be using the following method to copy and move files.
sudo cp /(file path) /(destination directory)
Sudo is used to give root permissions to non-root users. That is also why  I was prompted for the password. The cp command copies the file specified in the first path to the location specified by the second path. The windows C: drive is located in the /mnt directory. If you would want to move the file instead of copying it just use the mv command in place of cp.

Note

WSL is not really meant to include a GUI(graphical user interface), but you can install it if you feel like it. Check out how to do it here
Share:

Leave a Reply

Your email address will not be published. Required fields are marked *

The following GDPR rules must be read and accepted:
This form collects your name, email and content so that we can keep track of the comments placed on the website. For more info check our privacy policy where you will get more info on where, how and why we store your data.

Advertisment ad adsense adlogger