I always forgot tmux command, here a simple list of commands and shortcut keys.
Another good cheatsheet online
# create a session
tmux new -s session_name
# visualize sessions
tmux ls
# visualize windows
tmux list-windows
# attach a session
tmux att -t 0
# attach a window in a session
tmux attach-session -t <session-name>
# give a name of a window
tmux rename-window <new-window-name>
# give a name of a session
tmux rename-session <new-session-name>
# delete a window
tmux kill-window -t <window-name>
# delete a session
tmux kill-session -t <session-name>When you are inside a window
#create a new window
CTRL + B C
# rename a window
CTERL + B .
# visualize other windows
CTRL + B W
# visualize the sessions
CTRL + B S
CTRL + B V
# detach
CRTL + B D
#split the window
CTRL + B %
#slit vertical
CTRL + B "
#
CTRL + B Q
# move focus to a specific window
CTRL + B <numero>
# move in senso orario finestra
CTRL + B O
# focus sulla finestra principale
CTRL + B CTRL + 0
# rearrange windows
CTRL + B space
# muovere dimensione finestre
CTRL
# zoom mode (also turn back to the zoom mode)
CTRL + B Z
# Break current pane out of the window
CTRL + B !Ring the bell on terminal with tmux on other windows
You can do it manually for a single command <yourcommand> && tput bel
You can also setup use the bell externally with tmux command: tmux send-keys -t <window-name> C-g
Or you can setup the bell globally. You can use the bell-style option in your tmux configuration to specify how the bell should be displayed. Here's an example:
-
Open your
~/.tmux.conffile in a text editor. -
Add the following line to the file:
set-option -g bell-style anyThis sets the
bell-styleoption toany, which will ring the bell on the terminal when any activity occurs in a tmux window or pane. -
Save and close the file.
-
Reload your tmux configuration by running the following command:
tmux source-file ~/.tmux.confThis will apply the changes to your tmux configuration.