Linux Terminal Command: tmux
The tmux command is an essential tool in Process & Job Control. In this tutorial, we will explore what tmux does, look at everyday examples, and cover advanced options to supercharge your command-line workflow.
Concept & Explanation
The tmux command allows you to manage multiple terminal panes and tabs inside a single window, persisting sessions across SSH disconnects.
Common Options & Syntax
tmux [options] [arguments]
Here are the most common flags used with tmux:
- Simple Usage: Basic default commands.
- Detailed View: Shows diagnostic information.
- Advanced Actions: Can chain parameters for scripting.
1. Interactive Example (Simple)
Here is how most people run the command:
# Example
tmux
What it does: Launches a new tmux session.
2. Power-User Example (Advanced)
For scripting and advanced diagnostics, use this configuration:
# Advanced
tmux new -s dev -n editor
What it does: Creates a new tmux session named ‘dev’ and names the initial tab window ’editor’.
⚙️ Warning & Common Pitfalls
[!WARNING] Inside
tmux, the default command prefix key isCtrl+b. To detach from a session, pressCtrl+bfollowed byd.
🔗 Related Commands
Here are some related posts on cli_tty1 you might want to check out: