Tutorials / T6
The 10% of the terminal: a lab with four flags
The four skills of the terminal post, practised on a real SSH server inside Google Colab. Each section hides a flag, and a check cell tells you how many you have.
Why a lab
Reading a command is not the same as typing it. The post explains each skill with animations; here each one has to work for its flag to appear. It is the same night: 2:47, the Whisper training run on gpu has died, and you bring it back.
What you do
| Section | What you do | Where the flag is |
|---|---|---|
| 1. Moving around | Find the project, fix batch_size with nano, run a dry run | In the dry run’s output |
| 2. SSH | Create a key, copy it with ssh-copy-id, give the server an alias, scp both ways | On the last line of the failed run’s log |
| 3. tmux | Train inside the session train, leave with Ctrl-b d, come back | When the training finishes |
| 4. top | Find the process eating a CPU core, check it with ps, kill it | It is the process’s name |
Where it runs
Only in Google Colab. The notebook installs OpenSSH and tmux, creates a user with a known password and starts an SSH server that listens on 127.0.0.1 only, inside Colab’s virtual machine, which is deleted when you disconnect. Nothing runs on your computer. The terminal opens inside the notebook with colab-xterm.
Keep the one-page cheat sheet at hand.