1. What is Linux?
Linux is an operating system, like Windows or macOS. It is widely used in research computing because many scientific and bioinformatics programs are designed to run in Linux environments.
You will encounter Linux in several places:
- Ubuntu on your laptop through WSL.
- Remote servers accessed through SSH.
- High-performance computing (HPC) clusters.
- Bioinformatics tools such as FastQC, Salmon and Trinity.
2. Understanding the terminal
A terminal is where you communicate with your computer by typing commands instead of clicking through folders.
Open Ubuntu. You may see something similar to this:
isra@computer:~$
This is the command prompt. Type a command after the
$ sign and press Enter.
You do not need to type the dollar sign itself.
3. Your first five Linux commands
Command 1: pwd
pwd means print working directory.
It tells you where you are currently working.
pwd
Example output:
/home/isra
Command 2: ls
ls lists the files and directories
in your current location.
ls
Some useful variations:
ls -l
ls -lh
ls -a
-l: displays a detailed listing.-h: displays readable file sizes.-a: includes hidden files.
Command 3: cd
cd means change directory.
It allows you to move between folders.
cd Documents
Move one directory backwards:
cd ..
Return to your home directory:
cd ~
Command 4: mkdir
mkdir means make directory.
It creates a new folder.
mkdir Bioinformatics
Command 5: touch
touch creates an empty file if it does not
already exist.
touch notes.txt
4. Create your first RNA-seq project directory
Let's put these commands together. We will create a project directory to organise our RNA-seq analysis.
Run the following commands one at a time:
mkdir RNAseq_Project
cd RNAseq_Project
mkdir raw_data
mkdir results
mkdir scripts
mkdir quality_control
touch notes.txt
pwd
ls
Your directory should now look like this:
RNAseq_Project/
│
├── raw_data/
├── results/
├── scripts/
├── quality_control/
└── notes.txt
What are these folders for?
raw_data/— original sequencing data.results/— analysis outputs.scripts/— scripts and code.quality_control/— FastQC and MultiQC reports.notes.txt— project notes.
Keeping raw data separate from analysis outputs makes your project easier to organise and reproduce.
5. Quick command reference
| Command | Purpose |
|---|---|
pwd |
Shows your current location. |
ls |
Lists files and directories. |
cd |
Changes directory. |
mkdir |
Creates a directory. |
touch |
Creates an empty file. |
6. Practice
Open Ubuntu and complete these tasks:
- Create a directory named
Practice. - Enter that directory using
cd. - Create a file named
hello.txt. - Use
lsto confirm that the file exists.