Skip to main content

tmux

Basic Tmux Keybindings

Tmux uses a 'prefix' key, Ctrl+B by default, followed by another key to perform various operations like detaching from sessions, splitting windows, and navigating between panes.

KeybindingDescription
Ctrl+B DDetach from current session
Ctrl+B %Split window horizontally
Ctrl+B "Split window vertically
Ctrl+B Arrow KeysNavigate between panes
Ctrl+B XClose pane
Ctrl+B CCreate new window
Ctrl+B N/PNavigate between windows
Ctrl+B :Enter command mode

Configuring Tmux

Tmux allows users to permanently modify its behavior through the .tmux.conf file located in the user's home directory. Changes can include modifying the prefix key, adding new keybindings, and setting commands.

vi $HOME/.tmux.conf
# Set new prefix to Ctrl+A
set -g prefix C-a
unbind C-b
bind C-a send-prefix

Customizing the Status Bar

The tmux status bar is fully customizable from color changes to functionality tweaks. Modifications can be made directly or added to the .tmux.conf for persistence.

set -g status-bg cyan
set -g window-status-style bg=yellow
set -g window-status-current-style bg=red, fg=white