Tmux
Tmux is a powerful terminal multiplexer that allows users to manage multiple terminal sessions effectively. It's designed to help users switch easily between several programs in one terminal, detach them (they keep running in the background), and then reattach them to a different terminal. Customizing tmux to suit individual workflow preferences can significantly enhance productivity. Below are detailed examples of key tmux commands (keybindings) and insights into configuring tmux through its configuration file.
Tmux Keybindings
Tmux commands typically start with a "prefix key", which is Ctrl-b
by default, followed by a command key. Here are some commonly used tmux keybindings:
- Creating and Managing Windows and Panes:
Ctrl-b c
: Creates a new window within tmux.Ctrl-b ,
: Rename the current window; useful for keeping track of multiple windows.Ctrl-b %
: Splits the current pane vertically into two panes.Ctrl-b "
: Splits the current pane horizontally.Ctrl-b o
: Cycles through panes within the current window.Ctrl-b x
: Closes the current pane.
Tmux Configuration File
The tmux configuration file (~/.tmux.conf
) allows users to set default options, keybindings, and other preferences that customize the tmux environment. Here are examples of what you can define in this file:
After editing ~/.tmux.conf
, you can apply the changes by either restarting tmux or by executing tmux source-file ~/.tmux.conf
within a tmux session.
Youtube tutorial
I found the following Youtube video (if you can ignore its clickbait title :-) very useful for a quick demonstration of Tmux's main features.
References:
Last updated