Dev In The Mountain Header
A Developer In The mountains having fun

Terminal Multiplexers

Zellij, tmux, and a little screen nostalgia

A terminal multiplexer lets you run multiple terminal sessions inside a single window. You can split the screen into panes, organize work into tabs (or windows), and most importantly detach from a session and come back to it later with everything still running. Close your laptop, drop an SSH connection, log in from another machine, and your work is right where you left it.

I've used all three of the big ones over the years. Here's where I've landed.


Zellij — my daily driver

I've recently started using Zellij full time. The biggest reason is simple: the default config is nice and usable.

When I set up a new machine there's always a long list of things to install and configure. Shell, editor, dotfiles, fonts, and so on. With tmux, getting it to a state I actually enjoy means pulling in my .tmux.conf, installing a plugin manager, and installing plugins. With Zellij I install it, run it, and I'm working. That's one less thing to set up and configure on a new machine, and that adds up.

What you get out of the box:

  • A status bar that shows you the keys -- Zellij is modal (Pane, Tab, Resize, Scroll, Session, ...) and the bottom bar tells you what each key does in the current mode, so you don't need to memorize a cheat sheet.
  • Floating panes -- pop up a scratch pane over your layout for a quick command, then hide it again.
  • Layouts in simple KDL files -- describe a project's tabs and panes in a small readable file.
  • Session manager -- list, switch, and resurrect sessions from inside Zellij.
  • WASM plugins -- loaded by URL, no separate plugin manager needed.
# install
cargo install --locked zellij

# start
zellij

# attach to (or create) a named session
zellij attach -c mysession

# list sessions
zellij ls

tmux — still installed everywhere

Even though Zellij is what I use day to day, I still install tmux on every machine along with my old tmux config. A few reasons:

  • It's everywhere -- tmux is already installed, or one package install away, on pretty much every Linux server I SSH into. When I'm on someone else's box, tmux is what I can count on.
  • Muscle memory -- I used tmux for years, and Ctrl+b is burned in. If I need it, I want it to feel like my setup, not the bare defaults.
  • Rock solid and mature -- a huge plugin ecosystem and decades of edge cases ironed out.

My tmux config is pretty small these days. It uses tpm for plugins, tmux-sensible for better defaults, the Catppuccin theme, and vi keys in copy mode:

# set vi-mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel

# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'mocha'

# keep this at the very bottom
run '~/.tmux/plugins/tpm/tpm'

Then on a new machine:

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# start tmux, then press prefix + I to install the plugins

That isn't a lot of work, but it's a few more steps than Zellij needs, which is exactly the point.


GNU screen — back in the day

Before tmux, I used GNU screen. It's the original, first released back in 1987, and for a long time it was the way to keep a session alive on a remote server. screen -S name, Ctrl+a d to detach, screen -r to reattach. It did the job.

Honestly though, I haven't really used screen in close to 15 years. tmux took over for me long ago and now Zellij has taken over from tmux. Screen is still around and still works, and you may find it on some older systems where tmux isn't installed, so it's worth knowing the basics:

screen -S mysession   # start a named session
# Ctrl+a d            # detach
screen -ls            # list sessions
screen -r mysession   # reattach

Quick comparison

Zellijtmuxscreen
Written inRustCC
First released202120071987
Usable with no configyesmostly, but baremostly, but bare
Discoverable keysyes, on screenno, prefix + memorizeno, prefix + memorize
Floating panesbuilt inno (popups only)no
PluginsWASM, loaded by URLhuge ecosystem via tpmminimal
Available on serversinstall it yourselfalmost alwaysoften on older systems

Conclusion

For my own machines, Zellij wins because it's great right out of the box. It's one less thing to tinker with every time I set up a new system. tmux still earns its spot as the reliable fallback that's on every server and that my fingers still know by heart, so it and my config still get installed everywhere. And screen... screen was great for its time, and I'll always remember it as my first multiplexer.

See also

More places to find me
Mental Health
follow me on Mastodon