tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal, detach them and reattach them to a different terminal. It is invaluable for remote work and managing multiple terminal sessions.
📑 Table of Contents
Key Features
- Session Persistence: Sessions survive disconnection
- Window Management: Multiple windows per session
- Split Panes: Divide windows into panes
- Customizable: Extensive configuration options
- Copy Mode: Scroll and copy text with keyboard
Installation
Install tmux on Ubuntu:
sudo apt update
sudo apt install tmux
Usage Examples
Common tmux operations:
# Start new session
tmux new -s mysession
# Split horizontally
Ctrl+b "
# Split vertically
Ctrl+b %
# Detach session
Ctrl+b d
# Reattach to session
tmux attach -t mysession
# List sessions
tmux ls
Benefits
tmux enables productive terminal workflows with persistent sessions. Whether managing servers remotely or organizing local development, tmux is essential for power users.
Was this article helpful?