Setting Up a Terminal

By the end of this lesson you'll have a working command line - a real Linux-style shell - on your computer, whichever OS you use. This is the tool nearly every serious bioinformatics program runs through.

🟒 Beginner ⏱️ ~30 min πŸ’» Bash πŸ–₯️ Windows Β· macOS Β· Linux

Why the command line at all?

It looks intimidating - a blank screen waiting for typed commands - but here's the truth: most bioinformatics tools (aligners, variant callers, quality-control programs) have no buttons. They run from the command line, full stop. Learning Bash (the most common shell) isn't optional flair; it's the doorway to the entire toolkit. The good news: you only need a couple dozen commands to be genuinely productive.

Decode the jargon: shell, terminal, Bash

The terminal is the window. The shell is the program inside it that reads your commands. Bash is a specific, very common shell. People use the words loosely, but that's the relationship: terminal (window) β†’ shell (interpreter) β†’ Bash (one kind of shell).

🍎 macOS Already installed

You already have a terminal. Open Terminal (Applications β†’ Utilities β†’ Terminal, or press Cmd+Space and type "Terminal"). Modern Macs use a shell called zsh by default, which behaves almost identically to Bash for everything in these lessons - you're ready immediately.

Optional but recommended: install Homebrew (brew.sh), the package manager that makes installing bioinformatics tools easy later.

🐧 Linux Already installed

You're already living in the right place. Open your Terminal app (often Ctrl+Alt+T). It runs Bash by default. Nothing to install - skip to the check below.

πŸͺŸ Windows Install WSL

Windows doesn't ship with a Linux shell, but Microsoft makes it easy to add one: WSL (Windows Subsystem for Linux) runs real Ubuntu Linux right inside Windows. This is the recommended setup - it's what bioinformatics tutorials assume.

  1. Click Start, type PowerShell, right-click it and choose Run as administrator.
  2. Run:
wsl --install
  1. Restart your computer when it finishes.
  2. After restart, an "Ubuntu" window opens and asks you to create a username and password. Done - you now have a real Linux terminal in your Start menu.

Requires Windows 10 (version 2004+) or Windows 11. Lighter alternative: if you can't install WSL, Git Bash (from git-scm.com) gives you a basic Bash shell that's enough for these lessons.

Check it worked

In your terminal, type each of these and press Enter:

echo "Hello, command line"   # prints your text back
pwd                          # "print working directory" - where you are
ls                           # "list" - what's in this folder
whoami                       # your username

If each command responds, your terminal is ready. πŸŽ‰

βœ… You're ready when…

echo "Hello" prints Hello, and pwd shows a folder path. That's all you need for the basics lesson.

Stuck? Common snags

"wsl --install" prints a help message instead of installing

That usually means an older Windows build. Run wsl --install -d Ubuntu explicitly, and make sure Windows is updated. You must also be in an administrator PowerShell.

WSL install needs virtualization and errors out

Some PCs ship with virtualization disabled in the BIOS. The error message links to Microsoft's docs; enabling "Virtualization" / "SVM" / "VT-x" in your BIOS settings resolves it. If that's a hurdle, use Git Bash to get started today.

On Mac, my prompt says zsh, not bash. Is that a problem?

No. For everything in these lessons zsh and bash behave the same. You can switch to bash anytime by typing bash, but you don't need to.

Check your understanding

Why learn the command line for bioinformatics?
What does a shell (terminal) let you do?
On Windows, what does the lesson recommend installing to get a real Linux-style shell?
WSL runs real Ubuntu Linux inside Windows and is the recommended setup, because bioinformatics tutorials assume a Linux-style shell.
Which command in the check step prints your current folder (your location)?
pwd stands for print working directory and shows the path of the folder you are currently in.
On a Mac, the default shell is zsh instead of bash. According to the lesson, is that a problem for these lessons?
For everything in these lessons zsh and bash behave identically, so a Mac is ready to go; you can type bash to switch but do not need to.
Next in the Bash series

Command-line basics: files, pipes & text β†’