Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 3

Installing Ubuntu on WSL and Setting Up a Practice Directory

Recommended resources

Welcome back. You now have two foundations for ethical cybersecurity work: stay within explicit permission and scope, and describe security problems precisely using terms such as threat, vulnerability, exploit, and risk.

This lesson creates the workspace you will use for the rest of the course: Ubuntu running inside Windows through Windows Subsystem for Linux (WSL). You will install it, confirm that Windows recognizes it correctly, and make one dedicated folder for all course practice files. This is practical setup work—expect about 25 minutes of active steps, plus download and restart time.

WSL lets Windows run a real Linux command-line environment alongside Windows. It is not “hacking mode,” and it does not give permission to test anyone else’s systems. It is simply a safe Linux workspace on your own computer, which we will later use with local targets and authorized training labs.

Install Windows Subsystem for Linux (WSL)

Watch “Install Windows Subsystem for Linux (WSL)” from TechWithCosta for a quick visual explanation of what WSL is and why it lets Linux tools run alongside Windows.

Watch the WSL overview. Focus on the idea that Windows stays your main operating system while Ubuntu provides a Linux environment inside it.


Before you begin

Save any open schoolwork and plug in your computer if possible. Installation may require a restart. Because you will need administrator permission, ask a parent, guardian, or school IT staff member for help if this is a shared or school-managed computer. Do not try to work around device restrictions.

You will use two different command-line environments today:

Where you are What it is for today What its prompt may look like
PowerShell Installing and checking WSL from Windows PS C:\Users\YourName>
Ubuntu terminal Creating your Linux practice folder yourname@computer:~$

The prompt is only an indicator that the computer is ready. Do not type the prompt characters themselves.

This image shows the general idea of a Linux terminal: a command is entered after the prompt, and the prompt changes to show the current folder.

An Ubuntu terminal lists folders with `ls`, then changes into the Documents folder with `cd Documents`; the prompt updates to show `~/Documents`, which is the current location.


Install Ubuntu with WSL

Microsoft’s official WSL guide is the main reference for these steps. Read it once before starting, then keep it open in case you need to compare a message on your screen with the instructions.

How to install Linux on Windows with WSL

Read Microsoft’s official WSL installation guide. It gives the one-command installation method, explains the first Ubuntu launch, and shows the command used to verify the installed distribution.

In the “Install WSL command” section, read the installation passage through the explanation of the first launch. Then, under “Set up your Linux user info,” read the account setup context. Finally, in “Check which version of WSL you are running,” read the verification instructions. Focus on which commands belong in Windows PowerShell and which steps happen when Ubuntu first opens.

1. Open PowerShell as administrator

  1. Open the Start menu.
  2. Search for PowerShell.
  3. Right-click Windows PowerShell and choose Run as administrator.
  4. If Windows asks whether to allow changes, approve it only if this is your own computer or you have permission from the person responsible for it.

In the administrator PowerShell window, enter:

wsl --install

Then press Enter.

This command enables the Windows features WSL needs and installs Ubuntu, the default Linux distribution. Let it finish; the download may take a little while. Restart the computer when Windows asks you to.

2. Finish Ubuntu’s first-time setup

After the restart, Ubuntu may open automatically. If it does not:

  1. Open the Start menu.
  2. Search for Ubuntu.
  3. Open the Ubuntu application.

The first launch can take a few minutes while Ubuntu prepares its files. Then it will ask you to make:

  • a Linux username — use lowercase letters and something simple, such as a version of your first name;
  • a Linux password — choose one you can remember but do not share.

Your Linux password is separate from your Windows password. When Ubuntu asks you to type the password, nothing appears on screen—not even dots. That is normal. Type carefully and press Enter, then type it again when asked.

When setup succeeds, you should see a prompt that ends in a dollar sign, similar to:

student@windows-pc:~$

The exact username and computer name will differ. The important part is that you are now inside Ubuntu.



Verify that Ubuntu and WSL are working

Close the Ubuntu window for a moment, or type the following command in Ubuntu:

exit

You should return to PowerShell. Now run:

wsl.exe --list --verbose

You should see a table with an Ubuntu entry. The wording varies, but it will look roughly like this:

  NAME            STATE           VERSION
* Ubuntu          Stopped         2

Check these two things:

  1. Ubuntu appears in the NAME column.
  2. Its VERSION is 2.

A status of Stopped is fine if you closed Ubuntu. It means the distribution is installed but not currently running. Open Ubuntu again from the Start menu; it should now launch quickly.

If the normal install path does not work

Use the message you receive to choose the safe next step:

  • If wsl --install shows help text or says WSL is already installed, list available Linux distributions:

    wsl --list --online
    

    Then install Ubuntu using the exact Ubuntu name shown in that list:

    wsl --install -d Ubuntu
    
  • If the download stays at 0.0%, Microsoft’s guide suggests:

    wsl --install --web-download -d Ubuntu
    
  • If you see an error about virtualization, a BIOS or UEFI setting, or a school-device restriction, stop there and ask a parent, guardian, or IT administrator. Do not change firmware settings at random.



Create your dedicated course practice folder

Open Ubuntu again. You will now create one folder in your Linux home directory. Think of this as your course’s workbench: later, you will keep harmless practice files, saved Nmap results, and small Python scripts here.

Enter these commands one line at a time:

mkdir -p ~/cyber-course
cd ~/cyber-course
pwd
ls -la

Here is what each command does:

  • mkdir means “make directory,” or create a folder.
  • -p makes the command safe to run again; if the folder already exists, Ubuntu leaves it alone.
  • ~ means your Linux home folder, similar to your personal user folder in Windows.
  • cd ~/cyber-course moves you into the folder you just created.
  • pwd prints the full path of your current folder.
  • ls -la lists the folder’s contents, including hidden entries.

Your pwd output should end with something similar to:

/home/your-linux-username/cyber-course

Your ls -la output may show only . and .. at first. That is expected: the folder is empty except for Linux’s built-in references to the current folder and its parent.

You have now created the directory required for this course. Keep future course files here rather than scattering them across Downloads, Desktop, and random folders. You also do not need sudo—the administrator command—for work inside your own Linux home folder.



Completion check

Before moving on, confirm all three statements are true:

  • wsl.exe --list --verbose shows an Ubuntu distribution using Version 2.
  • Opening Ubuntu gives you a prompt ending in $.
  • Inside Ubuntu, pwd ends in /cyber-course.

Write down your Linux username and the path to your course folder somewhere private. Do not write down or share your password.



Key takeaways

  • WSL runs a Linux environment alongside Windows, without replacing Windows.
  • Run wsl --install in administrator PowerShell to install WSL and Ubuntu.
  • On the first Ubuntu launch, create a Linux username and password; invisible password typing is normal.
  • Use wsl.exe --list --verbose in PowerShell to confirm that Ubuntu is installed and using WSL 2.
  • Your dedicated Linux practice directory is:
~/cyber-course

Next, you will begin using that workspace by learning the three core navigation commands: pwd, ls, and cd.