← Back to Development Setup

⌨️ Terminal & Shell Basics

Learn just enough terminal commands to work with Python environments and Git. You only need about 10 commands to get started!

Why Do I Need This?

UV package manager runs from the terminal

Git clone downloads course notebooks via terminal

Navigate folders to find and organize your projects

Don't worry - it's much simpler than it looks! Most biology students master these basics in under an hour.

🚀

Recommended: Warp Terminal

A modern terminal with AI assistance - perfect for beginners!

Why Warp?

AI explains commands and errors

Smart auto-completion

Modern, intuitive interface

Command history search

Alternative: You can also use your system's built-in terminal (Terminal on Mac, Windows Terminal, or any Linux terminal). All commands work the same!

The Essential 10 Commands

These are the only commands you need for this course. Master these and you're good to go!

pwd

Print Working Directory - Shows where you are right now

$pwd
/Users/yourname/Documents

ls

List - Shows all files and folders in the current location

$ls
biology-python/ lecture-notes.pdf assignment1.py

cd

Change Directory - Move to a different folder

$cd Documents/biology-python

cd ..

Go up one level in the folder structure

$cd ..

mkdir

Make Directory - Create a new folder

$mkdir my-project

--help

Get help for any command (works with most commands)

$git --help
usage: git [--version] [--help] ...

git clone

Download a repository from GitHub

$git clone https://github.com/HocheggerLab/y3-bio-python.git
Cloning into 'y3-bio-python'...

uv venv

Create a Python virtual environment

$uv venv
Using Python 3.11.9 Creating virtualenv at: .venv

source (Mac/Linux)

Activate your Python virtual environment

$source .venv/bin/activate
(.venv) $

.venv\\Scripts\\Activate (Windows)

Activate your Python virtual environment on Windows

$.venv\\Scripts\\Activate.ps1
(.venv) PS C:\\>

💡 Pro Tip: Tab Completion

Press Tab while typing and the terminal will auto-complete file and folder names. This saves tons of time!

Type this:
$cd Doc[Tab]
It becomes:
$cd Documents/

🎯 Practical Walkthrough

Here's exactly what you'll do to set up the course notebooks:

1

Open your terminal

Launch Warp (or your default terminal)

2

Check where you are

$ pwd

This shows your current location

3

Navigate to Documents

$ cd Documents

Move to your Documents folder

4

Create a project folder

$ mkdir biology-python

Creates a new folder for course materials

5

Enter that folder

$ cd biology-python

Move into your new folder

6

Clone the course repository

$ git clone https://github.com/HocheggerLab/y3-bio-python.git

Downloads all course notebooks and materials

7

Enter the repo and set up environment

$ cd y3-bio-python
$ uv venv
$ source .venv/bin/activate

Windows users: use .venv\Scripts\Activate.ps1

🎉

Done!

You're ready to start coding. That's all the terminal you need!

⚠️ Common Issues

Command not found

If you get "command not found", the tool might not be installed or not in your PATH.

Solution: Re-check installation instructions for that tool (git, uv, etc.)

No such file or directory

The folder or file doesn't exist at that location.

Solution: Use ls to see what's actually there, check your spelling

Permission denied

You don't have permission to access that file or folder.

Solution: Make sure you're working in your own home directory (Documents, Desktop, etc.)

📋 Quick Reference

Navigation

pwdwhere am I?
lslist files
cd foldergo to folder
cd ..go up

Operations

mkdir namecreate folder
git clone urldownload repo
uv venvcreate env
source .venv/...activate env

💡Press Tab for auto-completion and to see previous commands!

📚 Want to Learn More?

This page covers everything you need for this course, but if you're curious to dive deeper into shell scripting and terminal power-user techniques:

DataCamp Shell Course

Interactive course to master the command line: