You can skip this step if you're on macOS or Linux, or already have WSL 2 configured. I know the course is called "Learn Linux", but if you're on Mac, it's Unix-like enough for all the lessons in this course.
The built-in Windows command prompt is terrible (in my opinion). It's so bad that if you're on Windows we're just going to have you install WSL 2 (Windows Subsystem for Linux). This will allow you to keep using your normal Windows desktop but also have a Linux command line, operating system, and filesystem for your programming work.
WSL 2 was a huge step forward for developers on Windows. You get a full Linux operating system and command line experience without the need to dual boot. WSL is an official Microsoft product: it won't mess up your base Windows install. You'll still be able to run Steam...
Here are a couple of things to keep in mind about WSL 2:
There are two versions of WSL. We will be using the latest: version 2.
The WSL 2 filesystem is completely separate from your Windows file system. Use your normal Windows file system normally: for games, documents, windows apps, whatever. I recommend using the Linux filesystem for all your code.
Assignment
Install WSL 2 and Ubuntu, and get the Ubuntu shell up and running.
Run wsl --install Ubuntu in the Command Prompt and follow the instructions.
It should bring up a new Ubuntu window, but if it didn't, you can search for the "Ubuntu" program in the start menu and launch it.
The Ubuntu window will prompt you to enter a username and password (which may not appear when typed). Make sure you remember these! These are the credentials for your Linux user. Later when you need to enter your password for certain commands, you'll need to re-enter this password. Note: by default Ubuntu only accepts usernames in lowercase.
echo "Hello world"
You should see the text "Hello world" printed to the console. If you do, you're good to move on to the next step.
Seeing Error: A required feature is not installed?
To fix this you will need to enable Hyper-V (Virtualization). You can find this in your Windows features. You will need both Hyper-V Management Tools, and Hyper-V Platform enabled.
You may also need to enable virtualization in your BIOS.
Ask in the Boot.dev Discord if you're still having trouble with WSL 2!