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.

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:

Windows Terminal

For windows, a great extension that all programmers should have is the Windows Terminal.

Windows Terminal is a modern terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and Windows Subsystem for Linux (WSL). Its main features include multiple tabs, panes, Unicode and UTF-8 character support, a GPU accelerated text rendering engine, and the ability to create your own themes and customize text, colors, backgrounds, and shortcuts.

To download and get started with windows terminal, click and follow the instructions on the following link: https://docs.microsoft.com/en-us/windows/terminal/get-started


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