Lesson 7 of 16 · 10 min
Meet the command line: your workbench
Almost every bioinformatics tool you will use is controlled from one place: the command line. Think of it as your workbench, where instead of clicking buttons you get work done by typing short instructions and pressing Enter. It looks bare at first, but it is the most powerful and flexible tool you will learn in this course.
What a shell is
A shell is a program that lets you run tasks by typing commands instead of clicking with a mouse, and the terminal is the window on your screen that shows the shell. When the terminal opens you see a prompt, a short line that often ends in a dollar sign, waiting for you to type a command and press Enter. Bioinformatics lives here because its tools are run by typing, its data files are often enormous, and typed commands can be saved, repeated automatically, and run on powerful shared computers called servers.
Finding your way
The first thing to learn is how to find your bearings. The command pwd, short for print working directory, tells you which folder you are currently sitting in, and ls, short for list, shows you the files and folders inside it.
pwd
ls/home/maria/bioinfo-course
data notes.txt README.md
To move into a folder, use cd, short for change directory. Writing cd data uses a relative path: it means the data folder inside wherever you happen to be right now. You can also give an absolute path such as cd /home/maria/bioinfo-course, which starts from the very top of the computer and works no matter where you currently are.
cd data
lsreads.fastq reference.fasta samples.csv
Tip: to learn what any command does, type man followed by its name (for example, man ls) to open its built-in manual, or add --help after a command (for example, ls --help) for a quick summary. Press q to leave a manual page. For a deeper dive into the shell, see the Linux for Bioinformatics course.
Try it yourself: open your terminal and run pwd to see where you are. Then use cd to move into a folder that exists on your computer (for example, cd Documents) and run ls to list what is inside. If you see 'No such file or directory', it just means that folder is not here; run ls first to see the names you are allowed to move into.