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

Common .tmux.conf settings for better defaults.

Change prefix to Ctrl-a

Replace the default prefix with a screen-style prefix.

tmuxANYtmuxconfigprefix
tmux
unbind C-b
set -g prefix C-a
bind C-a send-prefix

A common customization for users migrating from GNU screen.

Renumber windows automatically

Keep window numbers compact after closing windows.

tmuxANYtmuxconfigwindows
tmux
set -g renumber-windows on

Makes numeric navigation more predictable.

Enable mouse support

Use mouse selection and pane/window switching.

tmuxANYtmuxmouseconfig
tmux
set -g mouse on

Makes tmux friendlier for new users and for terminal emulators with good mouse support.

Start numbering at 1

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

tmuxANYtmuxconfigindex
tmux
set -g base-index 1
setw -g pane-base-index 1

Many users find one-based numbering easier to remember.

Reload config file

Apply config changes without restarting tmux.

bashANYtmuxsource-fileconfig
bash
tmux source-file ~/.tmux.conf

Use after editing `.tmux.conf`.

Status bar and appearance

Customize status content and theming.

Move status bar to top

Place the tmux status line above panes.

tmuxANYtmuxstatus-bar
tmux
set -g status-position top

A useful layout preference on smaller screens.

Show session name on the left

Customize the left side of the status line.

tmuxANYtmuxstatus-leftformats
tmux
set -g status-left "#[bold]#S "

Formats the current session name using tmux format strings.

Show host and time on the right

Add useful runtime context to the status line.

tmuxANYtmuxstatus-right
tmux
set -g status-right "#H %Y-%m-%d %H:%M"

Tmux supports format variables and time expansion.

Show pane titles

Display pane border status lines.

tmuxANYtmuxpane-border
tmux
set -g pane-border-status top

Helps identify panes during complex layouts.

Recommended next

No recommendations yet.