Tmux, short for terminal multiplexer, is a powerful tool used primarily in Unix-like operating systems. It allows users to manage multiple terminal sessions within a single window, enhancing productivity and multitasking capabilities.

Main Commands

# start new session
tmux
tmux new -s <session_name>
 
# list active sessions
tmux ls
 
# attach to existing session
tmux attach
tmux attach -t <session_name>
 
# kill session
tmux kill-session -t <session_name>
tmux rename-session -t 0 <session_name>
 
# command mode
# rename-window <window_name>
# rename-session <session_name>

Main Shortcuts

The shortcuts described here are slight different from the default ones. They are based on my personal Tmux configuration file.

ShortcutDescription
CTRL + A DDetach session
CTRL + A SList active sessions and windows
CTRL + A CCreate new window
CTRL + A NMove to next window
CTRL + A <1>Move to specific window
CTRL + A |Split pane vertical
CTRL + A -Split pane horizontal
CTRL + A HMove around panes (Left)
CTRL + A JMove around panes (Down)
CTRL + A KMove around panes (Up)
CTRL + A LMove around panes (Right)
CTRL + A ,Command mode