Setting Up Unix Computing Environment on Windows 10 with WSL

WSL, or Windows Subsystem for Linux, is a subsystem that allows users to run a Unix computing environment within Windows 10. This is the recommended method for having a local Unix computing environment for your Windows 10 machine, for the purpose of CS1010, CS2030, CS2030S, and CS2040 in Semester 1, AY2020/21.

There are two versions, WSL 1 and, a newer, WSL 2.

For the Unix@Home workshop, it suffices for attendees to install WSL 1.

Requirements

Before you proceed with the instructions below, you need to make sure that:

Installing WSL 1

Step 1: Enabling WSL on Windows 10 through PowerShell

Before you install WSL 1, you need to first enable the "Windows Subsystem for Linux" feature by running the following command in PowerShell.

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

You can achieve this step by:

Step 2: Restart your computer

Step 3: Install Ubuntu

After restarting your computer, go to the Microsoft Store and get Ubuntu 18.04 LTS.1

Follow the on-screen instructions to install.

When you are asked to create a user account and password, we suggest that you choose a Unix username that is that same as your SoC Unix username.

Launching WSL

To launch WSL, you can hit Win+R and type in Ubuntu followed by Enter. This should bring up the Unix command-line interface for you to interact with the Unix computing environment.

Getting ready to install tools

Ubuntu comes with apt as the package manager, which is a convenient way to list, search, install, update, and uninstall software and libraries in WSL.

After you have set up WSL, run the following:

sudo apt update
What it does:


  1. The latest Ubuntu 20.04 LTS is reported reported to be unstable on WSL 1.