CS 233 On Your Own Machine for Windows 10: WSL guideWARNING: EWS is NOT your own machine. Don’t try to do ANY of this on EWS.What’s WSL?Windows Subsystem for Linux, abbreviated WSL, is a tool for Windows 10 that lets you run a Linux shell on your Windows machine. It’s a great environment for doing labs for CS 233, but it requires a bit of setup. WSL is relevant to you only if you have Windows 10 installed. Show
There are two versions of WSL available: WSL 1 (originally just called WSL), and WSL 2. When we say WSL, we refer to WSL 1 and WSL 2 interchangeably. Beyond initial setup, they work the same for our purposes. What’s WSL 2? Do I need it?WSL 2 is a new implementation of WSL. It is not just an update for WSL 1; it works in a very different way behind the scenes. WSL 2 is faster and more flexible than WSL 1, but you do not need the extra speed or features for this course. On the other hand, WSL 1 is much easier to set up. In general, if you do not know for a fact that you need WSL 2, you’ll be fine with WSL 1. This guide will only tell you how to install WSL 1 for this reason. If, however, you are inclined to figure out how to install WSL 2, this guide will still help you do the rest. Do I have WSL 1? Do I have WSL 2? Do I even have WSL at all?Don’t assume you have a certain version of WSL. Open Windows Command Prompt and run this command to check for sure: The output you see will tell you if you have WSL fully set up, partially set up, or not installed at all. If you see something like this, you don’t have WSL installed at all.
You will need to enable WSL as a
feature on your machine and then install some version of Linux. To do so, follow this guide from the beginning. When you’re done, restart your computer and run If you see something like this, you’ve got WSL enabled, but you don’t have any particular version of Linux installed.
To fix this, follow
this guide starting at the If you see something like this, you have WSL installed and ready to run! Unfortunately, though, you’re not done yet.
The number under Installing required softwareThis part of the setup process will get you ready to complete the first few assignments, but you won’t be able to use graphical applications - anything that isn’t just on the command line. Launch WSLFirst, launch WSL by searching for If you see You should now see a Install required softwareNow you need to run a slew of commands to install all the software required for CS 233. Run each of these commands one by one, making sure each one runs successfully. When asked if you want to install each of these programs and you see download lists of available packagesRun the following command before trying to install software.
gitYou’ll be using makeYou’ll use
verilog and gtkwaveYou’ll use
clangAll your C and C++ code will be compiled with
qt5 librariesYou’ll need to install this before you can run
spim-vasmYou’ll use
If you see the following error, you will need to delete the
QtSpimYou’ll use
If you see the following error, you will need to delete the
If
try running the command below.
QtSpimbotYou’ll use
If you see the following error,
you will need to delete the
If
try running the command below.
X-Forwarding guide for WSL 1If you know for sure you have WSL 1 installed, follow this guide on how to set up X-Forwarding. X-Forwarding guide for WSL 2If you know for sure you have WSL 2 installed, follow this guide on how to set up X-Forwarding. I set up WSL, but how do I access Windows files from my WSL terminal?To access your Windows files from within WSL, use the following command, replacing YOUR-USERNAME-HERE with your Windows username:
You can also create a shortcut to your Windows home folder like so:
Now, you’ll be able to find your Windows files in Why is WSL not recognized?The term 'wsl' is not recognized as the name of a cmdlet, function, script file, or operable program. Ensure that the Windows Subsystem for Linux Optional Component is installed. Additionally, if you are using an ARM64 device and running this command from PowerShell, you will receive this error.
How do I enable WSL on Windows?How to Enable Windows Subsystem for Linux. Open Windows 10 Settings app.. Select Apps.. Click Programs and Features under the Related settings section on the right.. Under the Programs and Features page, click Turn Windows features on or off on the left panel.. Scroll down and enable Windows Subsystem for Linux.. How do I enable and install WSL in Windows 10?Step 1 - Enable the Windows Subsystem for Linux.. Step 2 - Check requirements for running WSL 2.. Step 3 - Enable Virtual Machine feature.. Step 4 - Download the Linux kernel update package.. Step 5 - Set WSL 2 as your default version.. Step 6 - Install your Linux distribution of choice.. Troubleshooting installation.. How do I install WSL on Windows 10?Prerequisites. ... . Install WSL command. ... . Change the default Linux distribution installed. ... . Set up your Linux user info. ... . Set up and best practices. ... . Check which version of WSL you are running. ... . Upgrade version from WSL 1 to WSL 2. ... . Ways to run multiple Linux distributions with WSL.. |