tmux
tmux is a terminal multiplexer that allows users to create, manage, and switch between multiple terminal sessions within a single window. Tmux is invaluable for developers and sysadmins who need to keep long-running processes or manage multiple terminals at once.
https://formulae.brew.sh/formula/tmux
- Definition: tmux (terminal multiplexer) is a command-line tool that allows users to run multiple terminal sessions within a single window, manage these sessions, and switch between them easily. It provides a way to keep terminal sessions running even when the user is disconnected.
- Function: Enhances productivity by enabling users to create, manage, and navigate multiple terminal sessions from a single interface.
- Components:
* '''Sessions''': Independent workspaces that can contain multiple windows and panes. * '''Windows''': Containers within a session that can hold multiple panes. * '''Panes''': Split views within a window, allowing multiple command lines to be visible at once. * '''tmux Configuration File''': Customizable settings and key bindings defined in `~/.tmux.conf`.
- Features:
* '''Session Persistence''': Keeps terminal sessions running even if the user disconnects or closes the terminal. * '''Multi-Window Management''': Allows multiple windows within a session, each with multiple panes. * '''Customizable Key Bindings''': Users can define custom key bindings to streamline their workflow. * '''Scripting and Automation''': Supports scripting for automating tasks within tmux sessions. * '''Remote Session Management''': Facilitates managing terminal sessions over remote connections.
Examples
- Starting a new tmux session:
```bash tmux new-session -s mysession ``` This command creates a new session named `mysession`.
- Attaching to an existing session:
```bash tmux attach-session -t mysession ``` This command attaches to the session named `mysession`.
- Creating a new window within a session:
```bash tmux new-window -n mywindow ``` This command creates a new window named `mywindow` within the current session.
- Splitting a window into panes:
```bash tmux split-window -h ``` This command splits the current window into two horizontal panes.
- Switching between panes:
```bash Ctrl+b o ``` This key combination switches focus between panes.
- Sample .tmux.conf configuration:
```plaintext # Set prefix key to Ctrl+a set -g prefix C-a unbind C-b bind C-a send-prefix
# Enable mouse support set -g mouse on
# Set status bar color set -g status-bg colour235 set -g status-fg colour136 ```
Summary
- tmux: A powerful terminal multiplexer that allows users to manage multiple terminal sessions within a single window. It offers features such as session persistence, multi-window management, customizable key bindings, and remote session management, enhancing productivity and workflow in the command-line environment.
- Snippet from Wikipedia: Tmux
tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing remote sessions to remain active without being visible.
Terminals: CLI - Command-Lines Interfaces, Shell (Bash Shell, ZShell), Linux Terminals (SSH, Secure Shell, Telnet, Fedora Terminal, Ubuntu Terminal), Windows Terminals (Microsoft Windows Terminal, PowerShell Terminal, Windows Command Prompt - cmd.exe), macOS Terminals (Warp.dev Warp Terminal, iTerm2, tmux, macOS Terminal,), IBM Mainframe Terminals, (3270, TN3270), GitHub Terminals, Awesome Terminals. (navbar_terminal - see also navbar_commandline)
Command-Line: Shell, Shell Hacks, Console, Terminal, Shell, Command-Line Tools, Docker Command-Line, Podman Command-Line, Kubernetes Command-Line, Linux Command-Line, Unix Command-Line, macOS Command-Line, Windows Command-Line, Windows Server Command-Line, Android Command-Line, Linux Terminal, macOS Terminal, Windows Terminal, Package Manager Command-Line, PowerShell Core, PowerShell, SSH, Command Prompt - Command Line - Command Line Interface - CLI, Cloud Shell - Azure Cloud Shell - AWS Cloud Shell - GCP Cloud Shell, Azure CLI, Azure PowerShell, AWS PowerShell, GCP PowerShell, Linux PowerShell, macOS PowerShell, REPL, Python interactive shell (navbar_commandline - see also navbar_terminal)
Cloud Monk is Retired ( for now). Buddha with you. © 2025 and Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.