Linux
starter pack
Within your first week in computational chemistry you will be staring at a black terminal window.
This guide covers enough Linux to find your way around it: setting up a terminal, files and permissions,
remote login, and getting a first job onto a cluster.
For newcomers to Linux and computational chemistry · Shell bash · Platforms Windows (WSL) · macOS · Linux
About this guide
Programs like ORCA, Quantum ESPRESSO and LAMMPS mostly run on Linux clusters. Uploading inputs, submitting jobs
and fetching the outputs all happen in a terminal. You don't need to memorise hundreds of commands: about twenty
cover daily work, and the rest you can look up when you need them.
Each chapter assumes the ones before it. If you are new, read from chapter 01 in order; if the terminal is already
familiar, skip ahead to chapter 06 (ssh) or 09 (HPC). Turning repetitive work into scripts is covered separately in the
shell scripting guide.
Chapters
01 · SETUP
Setting up a terminal
WSL on Windows, Terminal on macOS, up to your first command.
02 · FILES
Files and directories
Paths, moving around, copying and deleting, wildcards.
03 · VIEWING
Viewing and editing files
less, head, tail, a first look at grep, just enough nano and vim.
04 · PERMISSIONS
Permissions
Reading rwx, chmod, and why scripts need the execute bit.
05 · PROCESSES
Processes and environment
top and kill, PATH, .bashrc, running things in the background.
06 · SSH
ssh and keys
Making a key, ~/.ssh/config, logging in without a password.
07 · TRANSFER
File transfer
scp and rsync, fetching only the files you need.
08 · TMUX
tmux
Sessions that survive a dropped connection, split panes.
09 · HPC
First steps on HPC
Login vs compute nodes, modules, conda, submitting a first job.
10 · SOFTWARE
Useful software
Editors, visualisation, monitoring, tools for finding files.
11 · CHEAT SHEET
Cheat sheet
The commands you use most, on one page.
Conventions
In code boxes, a line starting with $ is a command you type, and the lines below it are output.
Don't type the $ itself. Parts in angle brackets, like <file>, are placeholders for your own values.
$ pwd
/home/kim
When you're stuck
Most commands explain themselves with man <command> or <command> --help.
Press q to leave a man page.