Zellij Guide: Why This Rust-Based Multiplexer is Replacing Tmux

Linux tutorial - IT technology blog
Linux tutorial - IT technology blog

Quick Start: Getting Zellij Running in 5 Minutes

Tmux and Screen have been the gold standard for decades. But let’s be honest: memorizing a dozen “prefix” shortcuts just to split a screen feels like a chore. Zellij is a modern alternative written in Rust that works intuitively right out of the box. I switched because I wanted a tool that didn’t require a printed cheat sheet just to manage three terminal windows.

Installation

If you’re on Arch Linux, you’ll find Zellij right in the community repositories. For most other distributions, the fastest route is using Cargo, the Rust package manager. The binary is compact—usually around 10-15MB—making it easy to move between machines.

# Using Cargo
cargo install --locked zellij

# On Ubuntu/Debian (Direct binary download)
curl -L https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz | tar xz
sudo mv zellij /usr/local/bin/

Basic Navigation

Type zellij in your terminal to start. You’ll immediately see a status bar at the bottom. This is Zellij’s “discovery” UI, and it’s a lifesaver for new users. It tells you exactly what to do: Ctrl + p enters Pane mode, Ctrl + t handles Tabs, and Ctrl + s opens Scroll mode.

Creating a vertical split is as simple as pressing Ctrl + p followed by n. To jump between panes, hold Alt and use the arrow keys. It feels snappy. Unlike the rigid ‘Prefix + %’ workflow in Tmux, navigating here feels like using a modern window manager.

Configuring Layouts Without the Headache

Zellij uses KDL, a document language designed for humans. If you’ve ever struggled with YAML’s strict indentation or JSON’s bracket soup, you’ll find KDL refreshing. You don’t need a massive config file to get started, but custom layouts are where you’ll save the most time.

Creating a Custom Layout

Layouts define your workspace structure. For my web projects, I use a layout that automatically boots a code editor, a dev server, and a small pane for Git. It saves me about 5 minutes of manual setup every morning.

Create a file named dev-layout.kdl:

layout {
    pane size=1 borderless=true {
        plugin location="zellij:tab-bar"
    }
    pane split_direction="vertical" {
        pane edit="src/main.rs"
        pane split_direction="horizontal" {
            pane command="cargo" {
                args "run"
            }
            pane command="git" {
                args "status"
            }
        }
    }
    pane size=2 borderless=true {
        plugin location="zellij:status-bar"
    }
}

Launch it by running: zellij --layout dev-layout.kdl. Everything opens exactly where you left it.

Customizing Keybindings

Vim users often find the default keys a bit foreign. You can easily remap them in ~/.config/zellij/config.kdl. I personally simplified my pane switching to match my Vim navigation. The configuration is granular, letting you map almost any action to a specific key combo without fighting the software.

Advanced Features: Floating Panes and Collaboration

Floating panes shifted my entire workflow. In traditional multiplexers, every pane is locked into a rigid grid. Zellij lets you toggle a pane to “float” over your workspace. I use this for 30-second tasks, like checking a man page or running a quick calculation, then hide it instantly to get back to my code.

Using Floating Panes

Press Ctrl + p then w to toggle a floating window. You can move, resize, or hide it with a few keystrokes. On a production Ubuntu 22.04 server with only 4GB of RAM, this approach was a massive help. Instead of opening five separate SSH connections, I ran one Zellij session. It handled the state in the background and kept my memory usage low.

Remote Session Sharing

Pair programming is surprisingly easy here. Zellij handles session attachment natively, so you don’t have to mess with complex socket permissions. If a teammate needs to help me debug a server issue, they just SSH into the machine and run:

zellij list-sessions
zellij attach <session-name>

We both see the same terminal in real-time. It’s a lightweight, lag-free alternative to heavy screen-sharing apps, especially when your bandwidth is struggling.

Performance Tips for Long-Term Use

After using Zellij for over a year, I’ve found a few ways to keep it running lean. First, don’t auto-start Zellij in every shell session. Add a check to your .zshrc to ensure it only triggers during interactive sessions. This prevents errors when you’re trying to use SCP or SFTP to move files.

The Power of WASM Plugins

Zellij’s plugin system is built on WebAssembly (WASM). This means developers can write plugins in Rust, C++, or Go, and they’ll run securely inside the multiplexer. I use the “Strider” file explorer plugin daily. It lets me navigate large directory trees without ever touching the mouse or leaving the CLI environment.

Managing Large Logs

If you’re tailing logs that spit out 5,000 lines a minute, your memory usage can climb. To keep things fast, limit your scrollback buffer in the config file. I cap mine at 10,000 lines. This provides plenty of history for debugging while keeping the RAM footprint minimal.

# In config.kdl
scroll_buffer_size 10000

Detaching Properly

Avoid just closing your terminal window. To keep your processes alive, use Ctrl + o then d to detach. You can come back days later, re-attach, and find your long-running scripts still moving. This persistence is a safety net for remote work where a spotty Wi-Fi connection might otherwise kill your progress.

Zellij isn’t just another Tmux clone. It’s a complete rethink of the command-line interface. By focusing on discoverability and modern standards, it makes terminal multiplexing accessible to everyone, not just the experts.

Share: