📜 I'm looking for an internship/co-op starting Winter 2025!
> Miguel VF

An Easy Guide to Using Tmux

Published: at 08:40 PM

Table of contents

Open Table of contents

Usage

Install tmux

sudo apt install tmux

Install tpm (Tmux Plugin Manager)

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Reload TMUX environment so TPM is sourced:

# type this in terminal if tmux is already running
tmux source $XDG_CONFIG_HOME/tmux/tmux.conf

Keybinds

To enter commands into tmux, you must enter a specific keybind, which is called the prefix key, followed by the command. My prefix key is ctrl + space.

To refresh tmux and install new plugins, type prefix + I (capital i, as in Install)

Window Management Commands

Command KeybindCommand Description
prefix + ccreate new window and switch to it
prefix + #switch to window #
prefix + nswitch to next window
prefix + pswitch to previous window
prefix + :swap window with next window
prefix + ;swap window with previous window
prefix + &kill window and all panes in it

Pane Management Commands

Command KeybindCommand Description
prefix + %split a pane horizontally into two panes
prefix + split a pane vertically into two panes
prefix + {swap pane with previous pane
prefix + }swap pane with next pane
prefix + h / switch to pane on the left
prefix + j / switch to pane below
prefix + k / switch to pane above
prefix + l / switch to pane on the right
prefix + q + #switch active pane to pane #
prefix + zzoom in/out of pane to take up full window
prefix + !break pane into a new window
prefix + xkill pane

Miscellaneous Commands

Command KeybindCommand Description
vstart selection in copy mode
yyank (copy) selection to system clipboard
ctrl + vtoggle between rectangular and line selection mode
prefix + rrefresh tmux configuration