Exploring TMUX: A Beginner's Guide

Introduction to TMUX

TMUX is a powerful terminal multiplexer that enhances your command-line experience by allowing you to manage multiple terminal programs within a single terminal window. It acts as a window manager for the terminal, enabling you to partition the terminal window into multiple panes, run multiple windows with the same session, and switch between different sessions like virtual desktops.

Key Concepts of TMUX

  1. Sessions: TMUX organizes terminal processes into sessions, allowing you to group tasks together. Sessions can be attached (worked on) or detached (backgrounded) as needed, preserving your work even if the original terminal connection is lost.

  2. Windows: Within each session, you can have multiple windows, each containing its own set of panes. Windows provide a way to manage different tasks within a session effectively.

  3. Panes: Panes are like mini-terminals within a terminal, allowing you to run applications or processes simultaneously. They can be split within windows to facilitate multitasking.

Tmux Cheat Sheet & Quick Reference

CommandDescription
tmux new -s session_nameCreate a new TMUX session with a specific name.
tmux attach -t session_nameAttach to an existing TMUX session specified by its name.
tmux kill-session -t session_nameTerminate a specific TMUX session identified by its name.
tmux kill-sessionTerminate all TMUX sessions except the current one.
tmux kill-session -aTerminate all TMUX sessions.
tmux rename-session -t old_name new_nameRename a TMUX session from old_name to new_name.
tmux detachDetach from the current TMUX session, leaving it running in the background.
tmux list-sessionsDisplay a list of all active TMUX sessions.
tmux attach-session -t session_nameAttach to the last active session or a specific session by name.
tmux switch-client -t session_nameAttach to a specific session by name.
tmux switch-client -lList all sessions and windows, allowing for easy navigation.
tmux lsList all sessions.
tmux infoShow every session, window, and pane.
tmux aReattach to the most recently created session.
tmux list-keysList all keybindings.
tmux newLaunch TMUX.
tmux -VCheck TMUX version.
tmux list-keysList all commands.
tmux aReattach to the most recently created session.
tmux manDisplay full manual of TMUX.