--- title: "tmux" category: "Terminal and shell" tagline: "Split one terminal into many, and keep sessions running after you disconnect." source: "pacman" package: "tmux" command: "tmux" code: "https://github.com/tmux/tmux" links: - name: "tmux wiki" url: "https://github.com/tmux/tmux/wiki" - name: "TPM, the tmux plugin manager" url: "https://github.com/tmux-plugins/tpm" --- ## What it is tmux is a terminal multiplexer. Inside one terminal window it runs several shells in windows and split panes, and it keeps them running when you close the window or lose an SSH connection. Later you reattach and everything is where you left it. ``` tmux new -s work # start a session; detach with Ctrl-b d, return with: tmux attach -t work ``` ## Why it's here - **Sessions that survive.** Long jobs on a remote machine keep running after you disconnect. - **Panes and windows.** Several shells side by side, without extra terminal windows. - **Works everywhere.** The same setup works locally and over SSH. ## On CoreDesktop tmux is installed from pacman, and CoreDesktop clones [TPM](https://github.com/tmux-plugins/tpm), the tmux plugin manager, into `~/.tmux/plugins/tpm`. CoreDesktop doesn't ship a `~/.tmux.conf`: list the plugins you want there and load TPM at the end of it, as TPM's README shows. `update` keeps tmux current with the pacman packages, and also pulls the latest TPM and every plugin under `~/.tmux/plugins`.