Getting started
Ten minutes from installing to knowing why a session survives closing the terminal.
Install
Prebuilt packages and binaries are on the releases page for linux and macOS, amd64 and arm64.
# Debian / Ubuntu
sudo dpkg -i termdock_*_amd64.deb
# Fedora / RHEL
sudo rpm -i termdock-*.x86_64.rpm
# Homebrew (macOS or Linux)
brew install padovanl/termdock/termdock
# From source, with Go 1.21+
go install github.com/padovanl/termdock@latest
Check it landed:
termdock --version
Your first session
Run termdock with no arguments. It attaches to a session
called main, creating it if it isn't there yet. You get one
pane running your shell, and a status bar along the bottom.
Everything termdock does starts with the prefix key, Ctrl-B, followed by another key. Any key you press without the prefix goes straight to the shell, exactly as if termdock weren't there.
Splitting into panes
Ctrl-B v split side by side
Ctrl-B s split top and bottom
Ctrl-B x close the pane you're in
Ctrl-B z zoom the pane to fill the screen (again to undo)
Move between them with Ctrl-B and an arrow key,
or h j k l if you
think in vim. Moving is the one thing you do repeatedly, so after a
prefixed arrow a bare arrow keeps moving for a second — crossing
three panes is Ctrl-B ←
← ←, not the prefix three
times.
Closed the wrong one? Ctrl-B Z brings it back, in the window it came from and the directory it was sitting in.
Windows are tabs
A window is a whole separate set of panes, like a browser tab. The strip along the bottom left is the window list.
Ctrl-B c new window
Ctrl-B n / p next / previous window
Ctrl-B 0-9 jump straight to window N
Ctrl-B , rename this window
Ctrl-B & close the window and everything in it (asks first)
Once you have more than a few, stop counting and start searching: Ctrl-B w opens a type-ahead list of every pane in every window, with a live minimap of the one you're about to jump to.
Detaching: the whole point
Press Ctrl-B d. You are back at your ordinary shell, and termdock says:
termdock: ▦ detached from "main" — it is still running; reattach with: termdock attach -t "main"
Nothing stopped. The panes, the shells, the program halfway through compiling — all of it is still running inside a daemon that is not attached to your terminal any more. Close the terminal window, log out, lose your SSH connection: it makes no difference to the session.
termdock ls # what's running
termdock attach -t main # pick up exactly where you left off
termdock kill-session -t main # actually end it
This is what a multiplexer is for, and it is worth trying deliberately once — detach, close the terminal entirely, open a new one, attach — because until you have seen it, every other feature reads as convenience rather than as the point.
Where to go next
- Every key — the full reference.
- Shell integration — one line in your shell rc that unlocks command history, jumping between commands, and copying a command's whole output. Start here if you only read one more page.
- Working in it all day — the features that earn their keep once a session has been open for a week.
- Configuration — themes, keys, settings you can change while it runs.