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
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.
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.
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
Command | Description |
tmux new -s session_name | Create a new TMUX session with a specific name. |
tmux attach -t session_name | Attach to an existing TMUX session specified by its name. |
tmux kill-session -t session_name | Terminate a specific TMUX session identified by its name. |
tmux kill-session | Terminate all TMUX sessions except the current one. |
tmux kill-session -a | Terminate all TMUX sessions. |
tmux rename-session -t old_name new_name | Rename a TMUX session from old_name to new_name . |
tmux detach | Detach from the current TMUX session, leaving it running in the background. |
tmux list-sessions | Display a list of all active TMUX sessions. |
tmux attach-session -t session_name | Attach to the last active session or a specific session by name. |
tmux switch-client -t session_name | Attach to a specific session by name. |
tmux switch-client -l | List all sessions and windows, allowing for easy navigation. |
tmux ls | List all sessions. |
tmux info | Show every session, window, and pane. |
tmux a | Reattach to the most recently created session. |
tmux list-keys | List all keybindings. |
tmux new | Launch TMUX. |
tmux -V | Check TMUX version. |
tmux list-keys | List all commands. |
tmux a | Reattach to the most recently created session. |
tmux man | Display full manual of TMUX. |