If you’ve ever found yourself frustrated by multiple terminal windows or disconnected SSH sessions, you’ll want to get to know tmux — a terminal multiplexer that brings organization and flexibility to your command-line workflows. Whether you’re a developer, sysadmin, or DevOps engineer, tmux can help you handle complex tasks and manage multiple sessions more efficiently.
Let’s break it down, starting with basic usage and moving towards advanced production-level scenarios.
At its core, tmux allows you to run multiple terminal sessions simultaneously, all within a single terminal window. Let’s cover the basics:
1. Starting a tmux Session
To create a new tmux session, run:
tmux
Or, name your session so you can easily reference it later:
tmux new -s my_session
This starts a new session named my_session
. You can now work as you would in any terminal, but with the added ability to create multiple windows and panes.