Click the virtual machine below to start practicing
- 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.
Click the virtual machine below to start practicing
Your progress through the guide is saved. Start a fresh machine to keep practicing.
tmux keeps terminal sessions alive on the machine, whether or not you're looking at them. Close the tab, lose the connection, or walk away: your programs keep running, and you pick up where you left off.
Keys are written Ctrl-b then %: press Ctrl+b, let go, then press %. Ctrl-b is tmux's prefix: it tells tmux the next key is for it.
tmux runs as a server: a background process that owns your sessions and everything running in them. Typing tmux starts the server (if it isn't running) and creates a session inside it. Your terminal then connects to it as a client: it just shows what's on the server and passes your keys through.
Detaching disconnects the client. The server, the session and the programs in it carry on, because they never belonged to your terminal in the first place. tmux attach connects a new client to the same session.
tmux
A green status bar appears at the bottom. You're inside a tmux session. It looks like a normal shell, and it is one. Try it:
echo hello from tmux
Press Ctrl-b then d.
[detached (from session 0)]
You're back in your plain shell, but the session is still running in the background, with anything inside it.
tmux ls
0: 1 windows (created Sat Oct 18 10:02:11 2026)
Unnamed sessions are numbered from 0.
tmux attach
You're back inside, exactly where you left off. Scroll up and you'll see hello from tmux still there.
tmux starts a session; the status bar shows you're inside.Ctrl-b d detaches and leaves it running.tmux ls lists sessions; tmux attach goes back in.