Running tmux
$ tmux
Naming the session
$ tmux rename-session tutorial
Creating another window
Ctrl + b, then c
Jump into last window
Ctrl +b, then l
Jump to next window
Ctrl + b, then n
Choose window interface
** Ctrl + b, then w**
The prefix key: Ctrl + b = Prefix
Switch to previous window
Prefix, p
Switch to next window
Prefix, n
Search for text in windows
Prefix, f
Detaching and attaching
Prefix, d
View the active sessions
$ tmux list-sessions
Reattach the detached session
$ tmux attach-session -t session-name
Renaming windows
Prefix, ,
Kiling windows
Prefix, &
Help on key bindings
Prefix, ?
Search down:
Ctrl + s and /
This command can be called on its own to set an option temporarily. However, most
of the time, we will use it to set options within a tmux configuration file so each time
we launch tmux, the options are set the way we would like.
$ tmux set-option status off
$ cd ~ $ touch .tmux.conf
Starting point
tmux show -g | sed 's/^/set -g /' > ~/.tmux.conf
Show options
$ tmux show-options $ tmux show-options -g
To set key modes add the following couple line to .tmux.conf
set-option -g status-keys emacs set-option -g mode-keys emacs
.tmux.conf
set-window-option -g mouse-mode on set-option -g mouse-select-window on set-option -g mouse-select-pane on set-option -g mouse-resize-pane on
Now is enough:
set -g mouse on
set -g status-style fg=black,bg=blue set-window-option -g window-status-current-style bg=#FF0000
$ tmux source-file ~/.tmux.conf
Sessions are essentially the base unit in tmux. It can have one or more windows, and
a window can be broken into one or more panes.
Creating sessions
$ tmux new-session -s name
Prefix, d
$ tmux new-session -s second_name
Prefix, s
Prefix, )
Prefix, %
Split the window horizontally
Prefix, "
Prefix, o
Prefix, arrows
Prefix, x
Prefix, z
Prefix key followed by the arrow keys to move on to the next one until all panes
To replay you need to login. Don't have an account? Sign up for one.