tmux Configuration and Customization

tmux .tmux.conf settings for prefix changes, mouse support, indexing, reloading, and status bar customization.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Core configuration
Change prefix to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix

# Replace the default prefix with a screen-style prefix.

Renumber windows automatically
set -g renumber-windows on

# Keep window numbers compact after closing windows.

Enable mouse support
set -g mouse on

# Use mouse selection and pane/window switching.

Start numbering at 1
set -g base-index 1
setw -g pane-base-index 1

# Set windows and panes to begin at 1 instead of 0.

Reload config file
tmux source-file ~/.tmux.conf

# Apply config changes without restarting tmux.

## Status bar and appearance
Move status bar to top
set -g status-position top

# Place the tmux status line above panes.

Show session name on the left
set -g status-left "#[bold]#S "

# Customize the left side of the status line.

Show host and time on the right
set -g status-right "#H %Y-%m-%d %H:%M"

# Add useful runtime context to the status line.

Show pane titles
set -g pane-border-status top

# Display pane border status lines.

Recommended next

No recommendations yet.