tmux basics

Start a long job on a server, close the laptop, come back to it later.

SNP 100 #2B6 Filed cmd tmux linux

shell
tmux new -s deploy

Run your long command in there. Detach with Ctrl-b then d, and the session keeps running on the server after you log out.

Back later:

shell
tmux ls
tmux attach -t deploy

Inside a session: Ctrl-b c opens a new window, Ctrl-b n and Ctrl-b p move between them, Ctrl-b % and Ctrl-b " split the pane. exit or Ctrl-d closes the current one.

tmux kill-session -t deploy ends it all.