Click the virtual machine below to start practicing
>_ Tekhnikum | Lab
Setting up virtual machine…
Preparing lab files…
Starting terminal services…
This lab machine has stopped
Your progress through the guide is saved. Start a fresh machine to keep practicing.
Quick recall
From the last lab. Answer in your head, then open to check.
1. Why does a running tmux ignore edits to ~/.tmux.conf?The config is only read when the server starts. Load changes with tmux source-file ~/.tmux.conf.2. Why does the config have unbind C-b after changing the prefix?Setting a new prefix leaves the old Ctrl-b binding in place; unbind removes it.
Introduction
Break and fix: someone has written a config, and it doesn't load. This is the most common real tmux problem there is.
The Broken Config
~/.tmux.conf has been written for you, but it's broken. tmux reports one error at a time, as file:line: message.
Tasks
Load it and read the error: tmux source-file ~/.tmux.conf (inside or outside tmux; if no tmux is running, start one with tmux new -s cfg -d first).
Fix that line, load again, and repeat until it loads with no errors.
Make sure the running tmux has the settings the config intends.
Requirements
When it's fixed and loaded:
the prefix is Ctrl-a
the mouse is on
the base-index line is valid: numbered from 1, or from 0 if you prefer (or delete the line)
each pane keeps 10000 lines of history
Ctrl-a | splits a pane side by side
Example
$ tmux source-file ~/.tmux.conf
$
No output means it loaded cleanly.
Solution
Four lines were wrong:
set -g mouse yes please -> set -g mouse on
set -g base-index one -> set -g base-index 1 (or 0, or delete it)
set -g history-limt 10000 -> set -g history-limit 10000
bind | split-window -v -> bind | split-window -h
The last one loads without an error but does the wrong thing: -v splits top and bottom. Then:
tmux new -s cfg -d
tmux source-file ~/.tmux.conf
Summary
Challenge complete. Compare your approach with the solution: there is usually more than one good way.