Kickoff — the basic concepts, before you need them
This deck is an overview, not the material. The four written parts have the details: worked examples, the exceptions, what breaks and why:
You need only Part 1 before a first practical. If you have little time, read Part 1 carefully, and use the rest of this deck as a preview.
A fair question, before you spend an evening on this.
The disadvantage: a terminal does not show what it can do. It shows a cursor and waits. Part 1 teaches you what to type.
Own figure.
The most important part is where you are now. It changes as you move around, and it answers the question that confuses beginners most often.
Own figure.
There are no drive letters. Everything — a second disk, a USB stick, a network drive — is a directory somewhere inside this one tree. And names are case-sensitive: Data.csv and data.csv are two different files.
pwd, ls and cd answer where am I? and what is here? Ask these two questions before you do anything else.
Press Tab. Every time, not only when you are stuck.
A file name typed from memory is a guess. A name that the shell completed is not: either it is spelled correctly, or the file does not exist. We repeat this because people forget it most often when they are in a hurry.
Four parameters, four jobs: -t, the separator, -k2 which column, -n compare as numbers, -r largest first. Without -n, 103 comes before 12, because as text it starts with a smaller character.
The shell splits what you type at each space. So it cannot tell a space inside a file name from a space between two arguments.
cd received two arguments, not one. Quotes (cd "lab notebook") fix it, but the real fix is simpler: use lab_notebook, and the problem never occurs. Graphical file managers and Windows allow spaces in names, so you meet this problem for the first time in the terminal.
Read it from left to right, as a sentence: sort, count the repeated lines, then sort that result as numbers. None of these four tools knows about the others. With the pipe, simple tools answer a question that no single program was written for.
* matches any number of characters. Before you use it with rm, check with ls which files it matches.
Terminal, tree, parameters, pipes, wildcards. The full page → also covers the backslash at the end of a line, stdin/stdout/stderr, how to read error messages, a short section on variables such as $HOME, and a checklist to test yourself.
Two projects can need different versions of the same dependency, and the versions may not work together. An environment stops the tools of one project from breaking the tools of another. If the environment is written down in a file, someone else can rebuild it and get the same result.
You do not need to “activate” anything. pixi run uses the tools of this project because you are in the directory of this project.
pixi.toml says what you asked for, and pixi.lock says exactly what you got. Commit both files. The full page → also covers conda and mamba. You will see both in documentation, even if you never install them.
Own figure.
git config --global user.name "You" # one-time, per machine
git config --global user.email "[email protected]"
mkdir -p repo && cd repo && git init -q
echo "print('hello')" > analysis.py
git add analysis.py
git commit -q -m "Add the analysis script"
git log --onelineIf a team shares one repository, this happens in the first hour:
Nothing is lost. Git refuses to overwrite someone else’s work with yours. The fix, and a good habit from the start: work on a branch, push it, and open a pull request, so that someone reads your changes before they go into main.
You will need an account. At least one person per team needs one, so that the shared repository can exist. In practice everyone needs one, because each of you pushes your own commits.
See it as more than a requirement. With pinned repositories, a short biography and a clear README for each project, your profile becomes a portfolio. One real example: github.com/jonas-fuchs.
When you apply for a job in this field, your profile can say more than a CV. It shows that you can do the work, instead of only claiming it.
add → commit → push. If other people share the repository, create a branch before you push. The full page → covers diff, restore, merge conflicts, and every step from a branch to a pull request.
READMEs and GitHub pages are written in Markdown. Tools use JSON to pass structured results to each other: six data types, no comments, no comma after the last item.
Also CSV/TSV, how Excel damages data files without telling you, and the two invisible things that cause errors in text files: line endings and encoding. The full page →
Reading the commands is not the same as running them. So first you need a place to type them. Any of these works.
| Nothing to install | webvm.io starts a real Debian Linux in a browser tab. No account, no download. Enough for all of Part 1. |
| On a Mac | You already have one: Applications → Utilities → Terminal. |
| On Windows | Install WSL2: run wsl --install in PowerShell as administrator, then restart. It is a real Ubuntu, and everything here then works for you without changes. |
| The long-term way | Install Linux on your own computer. Nothing here needs it, but everything here is easier with it. |
The browser version forgets everything when you close the tab, and you cannot install software in it. So from Part 2 on, you need one of the other three.
If your course gives you a prepared machine, you do not need to set anything up. But an hour of typing in a terminal of your own still helps: afterwards, the prepared machine feels familiar and not mysterious.