tmux
tmux is a command-line utility that splits a single text window into several independent workspaces. Its key advantage: running programs stay active even if you close the window or lose the connection to the server.
Many computer programs are not operated with a mouse, but through typed commands in a plain text window. This window is called a terminal or command line. A terminal can normally only display one program at a time, and if you close it, that program is terminated. tmux fixes both limitations. It splits a terminal into multiple areas that you can switch between. And it keeps the programs running inside it alive even if the window disappears.
Why dropped connections are no longer a problem
Developers often don’t work on their own machine, but on a server on the internet. They connect via an encrypted remote connection, usually SSH. If the WiFi drops or the laptop lid closes, the connection breaks. Without tmux, all programs that were running on the server die. A training run that has been going for six hours is then lost.
With tmux, this doesn’t happen. The programs run inside a so-called session, which is anchored on the server itself, not in the connection. If the connection drops, the session simply keeps running. You reconnect later and are right back where you left off. This is exactly why tmux is standard equipment for almost anyone who works with servers.
The second benefit is overview. In one area, a program runs that constantly spits out new status messages. Next to it, you calmly type further commands. Without tmux, you would need several terminal windows for this and would have to click back and forth between them.
Sessions, windows, and panes
tmux organizes everything into three levels. At the very top is the session, i.e. a complete working environment, for example for a specific project. A session contains several windows, which you can think of like tabs in a web browser. Each window can in turn be split into panes, i.e. tiles arranged side by side within the same view. Each tile runs its own program.
Control happens via keyboard shortcuts, since there is no mouse in the command line. All commands begin with a prefix key, by default Ctrl combined with b. This is followed by a second keystroke: a percent sign splits the view vertically, the letter c opens a new window, the letter d detaches the session. This detaching is called detach and is the core of the whole thing.
Technically, when detaching, a background process remains active on the machine. It keeps computing and collecting the output of the programs, even though nobody is watching. Upon later attaching, tmux simply displays again what has happened in the meantime. A common misconception is that tmux somehow saves the programs. It does not. If you restart the server, all sessions are gone.
From the server room to AI training
tmux is installed on almost every Linux server, or can be added with a single command. Anyone maintaining a database, installing an update, or watching log files usually works within it. The program has been available for free since 2007; its older relative GNU Screen can do similar things but is considered more cumbersome.
In the AI world, tmux is especially widespread. Training a model often runs for days or weeks on rented machines with specialized graphics chips. Nobody can stay continuously connected that long. You start the training run in a tmux session, detach, and check on progress twice a day.
AI assistants that independently perform programming tasks are also now using terminals of this kind. That’s why tmux regularly comes up in reports about such agents. Five shortcuts are entirely sufficient to get started; the rest you learn along the way.