Tmux
If you would like to know about screen, an alternative, click here.
Tmux, which stands for terminal multiplexer, allows you to run and seperate multiple login sessions within a seperate terminal window. This program is also useful for dealing with multiple programs from the terminal and seperating programs from the session that started the program, making it possible so remote processes continue running even when the user has disconnected from the SSH connection. In our case, we can use this program to keep an instance of weechat running, even when we exit the session. This is useful as we can read previous IRC messages without losing context/history from disconnecting connection, or switching between different devices.
the basics
To start Tmux, enter the command tmux into the terminal. Use Control + B followed by ? to open up the help screen. Here are other controls:
- Ctrl+b- cCreate a new window (with shell)
- Ctrl+b- wList all windows (press Esc to exit this mode)
- Ctrl+b- 0Switch to window 0 (by number)
- Ctrl+b- 'Switch to window 'n' (by number) (this works with multi-digit window index numbers too)
- Ctrl+b- ,Rename the current window
- Ctrl+b- "Split current window horizontally into two panes
- Ctrl+b- %Split current window vertically into two panes
- Ctrl+b- arrow-keySwitch the input focus to the next pane
- Ctrl+b- &Close the current region
- Ctrl+b- dDetach the current session
- Ctrl+b- tView the full-screen clock (press Esc to exit this mode)
restoring tmux session
Anything done after typing tmux can be safely closed by closing the terminal window or detaching the session. When reopening the SSH connection, you can quickly type in tmux a to re-attach the session.
Multiple tmux sessions can be listed using tmux ls (tmux list-sessions).
last compiled: 2025-08-28 03:00:05.331052
