From Screen to Tmux to Zellij

I used GNU screen for years. I don’t think alternatives existed when I started using. It worked everywhere, and I only needed a few features.

The insides of an old PC thrown on the ground outside. Weathered.

Eventually, curiosity pushed me to try tmux a few years ago but I didn’t see what advantage it had over the older software I knew already, so I went back to screen.

So it went for several years, until in the last few days I decided to try tmux again, and I even configured it to use the same CTRL-a shortcut as screen and it worked well! I configured it to switch between tabs like in screen using the 1-0 keys. I could scroll back, just like in screen. It even had a session manager that let me choose which tab to use, although I’m annoyed I had to tap right arrow to expand the list first.

I announced on Slack that I was moving to tmux, and shortly after, someone casually asked, “if you are doing the switch now, have you tried zellij?”

Life with screen

My screen usage was almost aggressively simple:

  • Ctrl-a c to create a new window
  • Ctrl-a 1–0 to jump between windows
  • Ctrl-a a to toggle to the last window
  • ESC and page up to view the scroll back.

That was it, but I used it all the time. The first thing I did on connecting to a server was screen -D -r to connect to screen.

I wasn’t using splits. I wasn’t scripting layouts. Screen was effectively a tab manager for shells, and it did that job reliably for decades. It’s still running like that on my servers, for the moment.

Moving to tmux

The first pleasant surprise was that tmux doesn’t force you to relearn anything.

With a small config change, tmux can behave almost exactly like screen:

  • Ctrl-a prefix
  • number-based window switching
  • last-window toggle
  • better copy/paste
  • better session handling

At that point, tmux felt like screen, but actively maintained. Tmux felt like the natural evolution of screen. I only used it for a day or so, but then I tried Zellij.

Discovering Zellij

Zellij describes itself as a “Terminal Workspace with Batteries Included”. Zellij doesn’t feel like a screen or tmux replacement. It is quite different. Instead of a simple bar at the end of the screen showing the tabs, there’s a menu with keys. Tapping the key combination updates the menu, showing new options. At the top of the screen are the tabs you’ll use. Unlike screen and tmux, there’s no one single shortcut like CTRL-a or CTRL-b, there are multiple. There’s one for each mode: panes, tabs, search and session (plus a few more).

The biggest conceptual shift is this: tmux is tab-first. Zellij is pane-first.

In tmux, I naturally created lots of windows, like I did with screen. I split one or two, but Zellij takes that to the next level.

In Zellij, the expectation is:

  • One tab = one context
  • Panes = the work inside that context

This sounds subtle, but it changes everything. You’re encouraged to create new panes in each tab before you make new tabs.

Discoverability over memorization

Zellij uses modes (pane mode, tab mode, scroll mode), and it shows you available keys on screen.

You don’t need a cheat sheet taped to your monitor. You look down, and the UI tells you what’s possible.

This is something tmux simply doesn’t try to do.

Pane-centric workflows

Zellij really shines when you stop creating tabs constantly and instead:

  • edit code in one pane
  • run or build in another
  • tail logs in a third
  • fullscreen a pane temporarily when you need focus

It feels closer to an IDE or a tiling window manager than a tabbed terminal.

Modern assumptions

Zellij assumes:

  • a modern terminal
  • Unicode support
  • decent fonts
  • OSC 52 clipboard support

That’s great locally. I’ll be interested to see how well it works on my VPS.

The Terminal

I use iTerm2 on a Mac and there were a few things to set up before I could use Zellij fully.

  • In Preferences → Profiles → (your profile) → Terminal make sure that “Mouse Reporting” is checked. That lets you click panes to select them, scroll up a pane, and select text to copy it.
  • Zellij uses the ALT key, but if you use CMD on a Mac the operating system will intercept that. Instead use the Option key. In Preferences → Profiles → Keys set “Left option key” to “Esc+”. That may interfere with copying and pasting though. Now type Option-n to open a new pane!
  • I was seeing odd characters in the UI. Little “?” characters in boxes. I needed a new font: brew install --cask font-jetbrains-mono-nerd-font
    Then in Preferences → Profiles → Text set the font to “JetBrainsMono Nerd Font Mono” or whichever one you prefer. You may have to restart Zellij to see the change.

This is barely touching the surface of what Zellij can do. If you use screen or tmux give it a go.