Windows Subsystem For Linux
Windows Users Only!
This page is only for those who are using Windows. Those with Mac or Linux operating systems can proceed to 'Command Line Tools.'
Windows Subsystem for Linux (WSL) is a feature in Windows 10 that enables you to use Linux command-line tools on your Windows system. By installing this feature, everyone in the course will be able to run the same commands, and get the same output - an essential aspect of reproducibility. We hope that you will continue to use the WSL features we introduce to you over the next three weeks after the course is over for your own research related computing.
The process for installing everything we need here is quite order dependent - follow the steps in the order they appear below.
Want More Information?
For more information about the Windows Subsystem for Linux, look here.
Up to Date Windows 10 Required!
To go further with this Installation Guide you need to have an up to date installation of Windows 10. IT Services in the Econ Department have assured us, if you update Windows to the latest version in your UZH laptop everything that follows will work.
If you do not have a Windows 10 machine. Contact us!
Install the Windows Subsystem for Linux
As a first step we need to install the Windows Linux Subsystem. Proceed as follows:
-
Open 'Settings' by searching for it in the search bar
-
In Setting, search for 'Apps & features'
-
Scroll down and click on 'Programs and Features'
-
On the left, click on 'Turn Windows features on or off'
-
Scroll down until you see 'Windows Subsystem for Linux' and click the box, and then click 'OK'
-
A prompt to restart your PC will appear, click 'Restart now' to restart your PC.
Installing a Linux Distribution
We are going to install 'Ubuntu' as our Linux distribution of choice. It is one of the more user friendly choices around.
Once your PC has rebooted, proceed as follows:
-
Open the Microsoft Store by searching for it in the search bar
-
Search for 'Ubuntu' in the Store search bar and press enter
-
Select 'Ubuntu 18.04 LTS' from the choices returned by clicking on it
-
Click 'Get' to install
-
Once installed, if you open the Windows Menu, you will See 'Ubuntu 18.04 LTS' under 'Recently Added'
-
Click on 'Ubuntu 18.04 LTS.' A black terminal will open, and inform you it is installing
-
Once installed, it will prompt you to create an account. Enter a username
-
And a password (Note: as you enter a password nothing will appear)
-
Re-enter the password as instructed
-
The installation will now have completed
WSL Not Enabled Errors
WSL not enabled
If at Step 6, you see the following:
This means you have not successfully installed the Windows Subsystem for Linux, or you did not restart your machine as instructed. Try to either:
- Restart your PC
- Return here and redo the process.
Installing Windows Terminal
The terminal that comes with Ubuntu 18.04 LTS out of the box is not our favorite, so we will install something a little better. Proceed as follows:
(You should be more comfortable installing stuff from the store now, so we will skip the screenshots)
- Open the Microsoft Store
- Search for Windows Terminal
- Choose the first option - Windows Terminal (Preview)
- Install it by clicking 'Get'
- Once installed, you will see it under 'Recently Added' in the Windows menu
- Open Windows Terminal
- To get access to your Ubuntu system, click the down arrow in the menu bar
- Select Ubuntu-18.04, and your Ubuntu terminal will open
The Way Forward
As you proceed through the remainder of the Installation Guide, you will generally follow the steps for 'Linux Users' and enter the commands into the Ubuntu Terminal we just installed.
Occasionally there will be differences between Linux and Windows steps - these will be clearly marked by a separate header 'Windows Users.'