Tmux

Updated 30 January 2020

tmux

tmux is an open source terminal multiplexer tool that gives user access to multiple terminal on one screen. With tmux, you can join and quit the current session, while all running programs and process remain. It comes with all Calculate Linux Desktop and Calculate Directory Server and flavours.

Start

To start tmux, run:

tmux

Session 0 will be run then.

To close a session with a single open window, run:

exit

Tmux can be commanded both from the terminal and the current sessions, by hot keys. To view the full list of supported commands, run:

tmux list-commands

Working with tmux

Not that in tmux, keys must be pressed one after another and not simultaneously. Press then release the Ctrl+b combination. Now press the command key.

Scrolling

Scrolling looks somewhat unusual: instead of pressing Shift+PgUp or Shift+PgDown, you must switch to the "copy mode", than scroll normally. Use q to return to normal mode.

Key combination Action
Ctrl+b, [ Switch to copy mode
Up, PageUp, Down, PageDown Scroll text in copy mode
q Quit copy mode

Working with sessions

Key combination Action
Ctrl+b, d Quit session
Ctrl+b, s Switch between sessions
Ctrl+b, w Switch between sessions and windows
Ctrl+b, D Kill a session

Working with windows

A session may include as many windows as you like.

Key combination Action
Ctrl+b, c Create a window
Ctrl+b, n, p Go to next or previous window
Ctrl+b, 0-9 Go to window 0-9
Ctrl+b, w Select window in interactive mode
Ctrl+Shift+d Close a window
Ctrl+b, & Close window with confirmation

Working with tabs

One window may have multiple tabs.

Key combination Action
Ctrl+b, % Vertical split
Ctrl+b, " Horizontal split
Ctrl+b, Up, Down, Left, Right Switch cursor between tabs
Ctrl+b, k, j, h, l The same with vim-like hot keys (in Calculate Linux only):
Ctrl+b, ; Go to previous active tab
Ctrl+b, Ctrl+Up, Ctrl+Down, Ctrl+Left, Ctrl+Right Resize tab
Ctrl+b, Shift+k, Shift+j, Shift+h, Shift+l The same with vim-like hot keys (in Calculate Linux only):
Ctrl+b, Ctrl+o Inverse tabs
Ctrl+b, Alt+1 Arrange tabs horizontally
Ctrl+b, Alt+2 Arrange tabs vertically
Ctrl+b, Alt+5 Align tabs
Ctrl+b, x Close tab (you may also type exit)

Other

Key combination Action
Ctrl+b, ? View all keybindings