Last Updated on May 22, 2022
In Operation
With a GUI desktop environment, you have windows. With tmux, panes replace these windows. Similar to desktop environments, panes let you run multiple applications, with the option to open, close, resize, and move them.
The most valuable feature is the ability to disconnect, and reconnect to a session, and even connect to the same session multiple times (i.e. from one than one location.) It lets you quickly jump in and out of a remote server.
Here’s a simple walk through of a few examples of tmux in action. We’re using it together with st, a terminal emulator which is extremely frugal. I’ll fire it up with the command st -e tmux
. Here’s what you’ll see.
When you’re using tmux, you’ll see an ever-present green bar at the bottom of the pane. You can configure the green bar to your liking, such as changing the background colour, or even turn it off. This green bar shows useful information such as the session number, who owns the active pane, whether you’re currently using the window, the hostname of the tmux server you’re using, as well as the date and time on that host.
You’ll need to master the command key bindings. Actions are performed by pressing a prefix key (Ctrl-b), followed by a separate key.
The software offers vertical and horizontal window split support. For example, to split the current pane into two, you can type Ctrl-b followed by ” (splits the current pane into two, top and bottom), or Ctrl-b followed by % (splits the current pane into two, left and right). The image below shows the former.
Naturally, you can split the current pane again. In the example below, we’ve split the bottom pane into two, this time horizontally.
We’ve therefore got 3 terminals available from a single terminal session. Eagle-eyed readers might have noticed we’ve renamed the current session (this is shown in the green bar). And it’s easy to navigate around the panes with Ctrl+b followed by an arrow key.
One of the best features is the ability to attach and detach panes. For example, you can detach a session with Ctrl+b d. But the detached session is still available, which lets you pick up where you left off. It’s an essential feature if you’ve got an unreliable network connection.
There’s lots of ways to manipulate panes including swapping panes, and moving panes to a different window.
You can show active sessions with tmux ls
.
Each tmux session has a number associated on the left hand side. This number is used to attach and return to the same session.
Next page: Page 3 – Other Features
Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Other Features
Page 4 – Summary
Complete list of articles in this series:
Excellent Utilities | |
---|---|
AES Crypt | Encrypt files using the Advanced Encryption Standard |
Ananicy | Shell daemon created to manage processes’ IO and CPU priorities |
broot | Next gen tree explorer and customizable launcher |
Cerebro | Fast application launcher |
cheat.sh | Community driven unified cheat sheet |
CopyQ | Advanced clipboard manager |
croc | Securely transfer files and folders from the command-line |
Deskreen | Live streaming your desktop to a web browser |
duf | Disk usage utility with more polished presentation than the classic df |
eza | A turbo-charged alternative to the venerable ls command |
Extension Manager | Browse, install and manage GNOME Shell Extensions |
fd | Wonderful alternative to the venerable find |
fkill | Kill processes quick and easy |
fontpreview | Quickly search and preview fonts |
horcrux | File splitter with encryption and redundancy |
Kooha | Simple screen recorder |
KOReader | Document viewer for a wide variety of file formats |
Imagine | A simple yet effective image optimization tool |
LanguageTool | Style and grammar checker for 30+ languages |
Liquid Prompt | Adaptive prompt for Bash & Zsh |
lnav | Advanced log file viewer for the small-scale; great for troubleshooting |
lsd | Like exa, lsd is a turbo-charged alternative to ls |
Mark Text | Simple and elegant Markdown editor |
McFly | Navigate through your bash shell history |
mdless | Formatted and highlighted view of Markdown files |
navi | Interactive cheatsheet tool |
noti | Monitors a command or process and triggers a notification |
Nushell | Flexible cross-platform shell with a modern feel |
nvitop | GPU process management for NVIDIA graphics cards |
OCRmyPDF | Add OCR text layer to scanned PDFs |
Oh My Zsh | Framework to manage your Zsh configuration |
Paperwork | Designed to simplify the management of your paperwork |
pastel | Generate, analyze, convert and manipulate colors |
PDF Mix Tool | Perform common editing operations on PDF files |
peco | Simple interactive filtering tool that's remarkably useful |
ripgrep | Recursively search directories for a regex pattern |
Rnote | Sketch and take handwritten notes |
scrcpy | Display and control Android devices |
Sticky | Simulates the traditional “sticky note” style stationery on your desktop |
tldr | Simplified and community-driven man pages |
tmux | A terminal multiplexer that offers a massive boost to your workflow |
Tusk | An unofficial Evernote client with bags of potential |
Ulauncher | Sublime application launcher |
Watson | Track the time spent on projects |
Whoogle Search | Self-hosted and privacy-focused metasearch engine |
Zellij | Terminal workspace with batteries included |