Tmux Cheatsheet
This page presents a list of commonly used commands for tmux.
Categories:
Access this page by simply typing in "cs tmux" in your browser address bar if you have bunnylol configured.
Commands
Session
# Start a new tmux session.
tmux
# Start a new tmux session with name.
tmux new -s <session-name>
# List all sessions.
tmux ls
# Attach to the last session.
tmux attach
# Attach to a session with name.
tmux attach -t <session-name>
# Kill a session.
tmux kill-session -t <session-name>
# Kill sessions other than the current one.
tmux kill-session -a
# Kill sessions other than the named one.
tmux kill-session -a -t <session-name>
Window
# Create a new window and switch to it.
tmux new-window
# Create a a new window with name, but do not swith to it.
tmux new-window -t -n <window-name>
# Kill the current window.
tmux kill-window
# Kill the target window.
tmux kill-window -t <window-name>
# Send keys to the target window. (End with C-j for enter)
tmux send-keys -t <window-name> <command> C-j
Info
# Show tmux session information.
tmux info
Config
# Reload config.
tmux source-file ~/.tmux.conf
# Show config.
tmux show-options -g