Skip to lesson content

Part 1 · Set up your workspace

Set up WSL2 and Ubuntu.

Open a Linux environment on your Windows PC, try a few commands, and create your first bioinformatics working directory.

View the original six-slide lesson and discussion ↗

Before you start

Many bioinformatics tools run in Linux. Windows Subsystem for Linux (WSL) lets you use a Linux environment on the same PC as your familiar Windows desktop. Ubuntu is the Linux distribution used in this lesson.

  • Use Windows 11, or Windows 10 version 2004, build 19041 or later.
  • Have an internet connection and administrator access for installation.
  • Allow about 10 minutes for the exercise, with extra time for downloads and a restart.

These installation requirements and commands follow Microsoft’s WSL installation guide.

What you should have at the end

An Ubuntu terminal using WSL2 and a project folder containing data, results, and README.txt.

Step 01 · Windows PowerShell

Install WSL and Ubuntu

Search for PowerShell in Windows, choose Run as administrator, and enter:

Windows PowerShell · Administrator
wsl --install

Restart Windows when prompted. Then find Ubuntu in the Start menu and open it. On first launch, choose your Linux username and password.

Nothing appears while you type the password?

That is normal in the Linux terminal. Type your password and press Enter.

Already have WSL and Ubuntu installed? Continue with the checks below. First-launch account behaviour is described in Microsoft’s environment setup guide.

Step 02 · Check, then explore

Check your environment

Back in Windows PowerShell, run:

Windows PowerShell
wsl --list --verbose

Find Ubuntu and check that its VERSION column is 2. Its state may be Running or Stopped. If you see version 1, refer to the version-conversion section of Microsoft’s installation guide before continuing.

Now open Ubuntu and try these commands, one line at a time:

Ubuntu terminal
whoami
pwd
ls
whoami
Show the Linux username you are using.
pwd
Show your current directory.
ls
List the files and folders there. An empty folder can produce no output.

Step 03 · Ubuntu terminal

Create your first workspace

Run these commands in Ubuntu, one line at a time. The ~ symbol refers to your Linux home directory.

Ubuntu terminal
mkdir -p ~/bioinformatics_training
cd ~/bioinformatics_training
mkdir -p data results
printf "Bioinformatics starts here\n" > README.txt
ls -lh

The final command should list two folders and one text file. File sizes, dates, and your username will differ.

bioinformatics_training/
├── data/
├── results/
└── README.txt
data/
Keep input files here.
results/
Keep the output of your exercises here.
README.txt
Keep a short note about the project.

A clear folder structure makes it easier to understand your work when you return to it. We will build on this workspace in later lessons.

Step 04 · Five-minute challenge

Make one small thing yourself.

Inside bioinformatics_training, create a folder called lesson01 and a file inside it called notes.txt. Put one sentence about what you learned in the file.

Use mkdir, cd, and printf or echo. Check your result with ls.

bioinformatics_training/
└── lesson01/
    └── notes.txt

Once you have tried it, share what worked or the question that stopped you in the original lesson discussion.

If you get stuck

Am I typing in PowerShell or Ubuntu?

The installation and WSL version checks belong in Windows PowerShell. The file and folder commands belong in Ubuntu. Each command block above names the correct terminal.

WSL installation did not finish.

Note the exact error and check the official WSL troubleshooting guide. On an institution-managed computer, your IT team may need to help with installation.

Can I follow along if I have never used Linux?

Yes. This first exercise introduces the commands you need as you use them. Take one line at a time and check the result before continuing.

Continue with Part 2

FASTA vs FASTQ

What is actually inside a sequencing file? Create your first practice files and learn how to inspect them.