Windows Subsystem for Linux
These instructions will allow you to set up the Windows Subsystem for Linux, which will allow you to run Linux bash commands on the Windows 10 operating system without the need of a virtual machine. Ubuntu will be used for example purposes.
Note: The Documents folder in Windows is located in “/mnt/c/Users/{Username}/Documents” in the Linux environment.
Setting up the Ubuntu terminal
In the start menu, type “Powershell”
Right click, and click Run as Administrator. Click Yes
Run the following command:
You will need to restart your computer. Powershell will provide this option. Type y and hit enter to restart.
Go the Microsoft Store and search “Linux”.
It will take a few minutes to install.
Create a username and password.
Note: you will not be able to see the password characters you type, so type carefully.
Important: Make sure you remember this password!
Type: sudo apt-get update
Setting up Graphics Support (X Server)
VcXsrv setup
Search for “VcXsrv” in your browser or click
here.
Download from Source Forge
Run the installer.
Open VcXsrv and select the following settings.
In Display settings, leave “Multiple Windows” checked. Click Next.
In Client settings, leave on “Start no client” and click Next.
In Extra settings, keep “Clipboard” checked, but uncheck the others, including opengl. Click next.
Save the configuration to somewhere that you can easily find it, like the Desktop.
Click Finish.
If it asks you to allow access through the firewall, things should still work if you click “Cancel”.
Ubuntu setup
In ubuntu, type the following commands:
Add the following to your ~/.bashrc:
Installing Other Packages
Software Packages in Ubuntu can be installed with “sudo apt-get install <command>”
Example commands:
sudo apt-get install python3-numpy
sudo apt-get install python3-matplotlib
sudo apt-get install python3-scipy
sudo apt-get install gedit
Mounting a USB Drive in the Linux Environment
The path to the USB drive is located in “/mnt/{drive_letter}”. In this example, it is assumed that the USB is located in E: in the Windows system. Replace instances of E: or e with your drive letter.
First time setup:
To mount usb drive:
To unmount usb drive:
Suggested alias to add to ~/.bashrc to streamline the mounting and unmounting process.