When I got into Linux, I stuck with GUI tools for a few months before slowly transitioning to terminal applications. With all the QoL features in Konsole, Ghostty, and other modern terminal emulators, my coding tasks became surprisingly fast, though something was still amiss. Thanks to my home lab, I’d often switch distros on a whim, which meant learning new shortcuts for each emulator. And since I’ve always loved tinkering with VMs, I’d have to put up with random disconnections that forced me to rerun long commands.

Fortunately, I encountered Tmux fairly early in my Linux forays, and after getting accustomed to its commands, it's become an essential part of my CLI workflow – to the point where it’s the first app I install on every Linux VM and bare-metal system in my computing arsenal.

Tmux windows and panes are amazing for multitasking

And they work with most terminal emulators

For the uninitiated, Tmux may sound like an ordinary terminal emulator, and that's low-key what I thought when I first heard of this tool. But that couldn't be further from the truth. Instead, it’s a terminal multiplexer, which is essentially a console app that runs inside another terminal emulator to create a bunch of virtual CLI sessions. That may sound simple on paper, but it's a godsend when you’re working with multiple tasks.

Let’s say you’re creating a script in a terminal and need to paste code snippets into another file, move certain configs around, and install a completely unrelated package – all while wanting to monitor the resource utilization metrics of the system. Tmux makes this workflow a lot less convoluted than your average terminal emulator.

The Ctrl+B combo serves as the basic prefix for every shortcut, and you can combine this phrase with other keys to control your Tmux interface. For example, you can instantly create new windows for your tasks by pressing C after Ctrl+B, and switch between them using Ctrl+B P (previous window) and Ctrl+B N (next window). Then, you can split each window into vertical panes via Ctrl+B % and into horizontal panes using Ctrl+B “. You can even subdivide each window into nested panes and use Ctrl+B with arrow keys to cycle between them. The best part? These shortcuts remain the same regardless of the underlying terminal emulator or Linux distro.

Since Tmux lets you access a bunch of terminal windows and panes, you can use it in tandem with typical CLI applications. For example, I often keep Htop open in a tiny pane when working with lightweight Linux distros, while Midnight Commander runs alongside it in a separate Tmux pane.

Session persistence is a game-changer

Pretty handy for accessing remote machines… from different systems

Now, if you’ve used Kitty, Terminator, or other modern terminal emulators, you may be familiar with the tab management provisions that ship with them. And truth be told, they rival the panes and windows in Tmux. But the real draw of this terminal multiplexer is its session persistence, which keeps processes running even when you close the connection accidentally or otherwise. As such, you can detach your current session using Ctrl+B D, hop back into it later by entering tmux into the terminal, and resume your scripting tasks from where you left off.

To top it off, you can even switch devices and have your scripts and commands running just fine when you reattach the session from another system. I cycle between my hypervisor’s terminal, my MacBook, and my gaming PC when accessing virtual machines, and getting back into my tasks is a real pain on a normal SSH client. With Tmux, I could detach the current session on my PC, SSH into the VM from my MacBook, and run tmux to get back into the session as though I were still on my PC.

The session persistence also has the added advantage of connection resilience. Let’s say you’re executing a bunch of long commands over SSH, and the remote system suddenly disconnects. On a typical terminal interface, you’ll have to start things from scratch. With Tmux, the session continues to run in the background even when the SSH connection breaks. So, once you re-establish the connection, you can continue your coding tasks. This makes it quite handy for compilation tasks, automation scripts, huge package installations, and other CLI processes that can get disrupted by dropped connections. As a Proxmox user, session persistence is the main reason why I install Tmux on my PVE hosts and ignore the tenet about keeping external packages away from virtualization platforms.

You can boost its utility even further with plugins

Just like most FOSS Linux utilities, you can make Tmux even more useful using a couple of community-created plugins. The tmux-resurrect plugin is my favorite of the bunch, as it amplifies Tmux’s session persistence capabilities by allowing you to resume work after a reboot, and tmux-continuum takes this a step further by automatically restoring windows and panes when you launch Tmux. There’s also the tmux-vim-navigator, which lets you switch between the terminal multiplexer and text editor seamlessly.

👁 Arch Linux laptop on a wooden table
3 things users should keep in mind when choosing their first distro on Linux

Picking your first distro? With various choices, choosing the right one may feel overwhelming. Here are some valuable tips every beginner should know.

By  Judy Sanhz