Zellij: Install and Use This Rust-Based Terminal Multiplexer as a tmux Alternative on Linux

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

After years of using tmux, I still remember Googling “tmux split pane horizontally” every time I needed to split the screen. The default keybindings — Ctrl+b, then %, then " — are anything but beginner-friendly. Zellij was built to solve exactly that pain.

The Real Problem with Traditional Terminal Multiplexers

tmux is a solid tool, but the barrier to entry is high. To use it effectively, you need to memorize a dedicated set of keybindings, understand the session/window/pane model, and write a ~/.tmux.conf from scratch if you want a decent interface. For someone just starting out with Linux administration, that’s unnecessary overhead.

Zellij takes a different approach: every available action is displayed directly on the statusbar at the bottom of the screen. You can see at a glance which mode you’re in and what you can do next. No memorization required, no cheat sheet taped to the wall.

On the technical side, Zellij is written in Rust — small memory footprint with no memory leaks over time. On my company’s old CentOS 7 server, after months of continuous uptime, screen and tmux would both balloon noticeably in memory usage. Zellij doesn’t have that problem.

Installing Zellij on Linux

Ubuntu / Debian

Zellij isn’t in the default apt repository yet. The fastest way is to download a binary release:

VERSION=$(curl -s https://api.github.com/repos/zellij-org/zellij/releases/latest \
  | grep '"tag_name"' | cut -d'"' -f4)
curl -L "https://github.com/zellij-org/zellij/releases/download/${VERSION}/zellij-x86_64-unknown-linux-musl.tar.gz" \
  -o /tmp/zellij.tar.gz
tar xf /tmp/zellij.tar.gz -C /tmp
sudo mv /tmp/zellij /usr/local/bin/
zellij --version

Arch Linux / Manjaro

sudo pacman -S zellij

Fedora / RHEL / CentOS

The musl-linked binary runs fine on CentOS 7 because it doesn’t depend on the system glibc version — this is what I use on my company’s server:

curl -L https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz \
  | tar xz -C /tmp
sudo mv /tmp/zellij /usr/local/bin/

Or, if you already have the Rust toolchain:

cargo install zellij

Verify the Installation

which zellij
zellij --version
# Output: zellij 0.41.x

Configuring Zellij in Detail

Configuration File

Zellij looks for its config file in this priority order:

  1. The $ZELLIJ_CONFIG_FILE environment variable
  2. ~/.config/zellij/config.kdl
  3. Built-in defaults

Dump the default config to a file so you can customize it:

mkdir -p ~/.config/zellij
zellij setup --dump-config > ~/.config/zellij/config.kdl

Config uses the KDL format — easy to read, no need to worry about braces or indentation rules like JSON/YAML:

// ~/.config/zellij/config.kdl

theme "catppuccin-mocha"

// Disable mouse mode if you need to select text with your terminal emulator
mouse_mode false

// Scroll buffer
scroll_buffer_size 10000

// Show pane borders and names
pane_frames true

// Copy to clipboard (Linux X11)
copy_command "xclip -selection clipboard"
// For Wayland use: "wl-copy"

Layouts — Reusable Screen Arrangements

This is Zellij’s biggest advantage over tmux. Layouts are defined in KDL files and can be loaded on demand without any manual setup:

mkdir -p ~/.config/zellij/layouts
// ~/.config/zellij/layouts/dev.kdl
layout {
    pane size=1 borderless=true {
        plugin location="zellij:tab-bar"
    }
    pane split_direction="vertical" {
        pane split_direction="horizontal" {
            pane {
                name "editor"
                command "nvim"
            }
            pane {
                name "git"
                size "30%"
            }
        }
        pane {
            name "server"
            size "35%"
        }
    }
    pane size=2 borderless=true {
        plugin location="zellij:status-bar"
    }
}

Start Zellij with a layout:

zellij --layout ~/.config/zellij/layouts/dev.kdl

Customizing Keybindings

By default, Zellij uses Ctrl+p for Pane mode and Ctrl+t for Tab mode. Override them for faster navigation:

// Add to config.kdl
keybinds {
    normal {
        // Quickly open a new pane with Alt+n
        bind "Alt n" { NewPane; }
        // Close the focused pane
        bind "Alt w" { CloseFocus; }
        // Toggle floating pane quickly
        bind "Alt f" { ToggleFloatingPanes; }
    }
}

Themes

List all available themes:

zellij setup --dump-themes | grep -E "^[a-z]"

Popular options include: dracula, tokyo-night-dark, catppuccin-mocha, gruvbox-dark, nord. Set one in config.kdl:

theme "tokyo-night-dark"

Practical Usage and Testing

Day-to-Day Basics

zellij                  # Start a new session
zellij attach           # Attach to a running session
zellij list-sessions    # List all active sessions
zellij -s dev           # Create a session named "dev"

In-session actions — all shown on the statusbar, nothing to memorize:

  • Split pane vertically: Ctrl+pd
  • Split pane horizontally: Ctrl+pn
  • Move between panes: Ctrl+p → arrow keys
  • Resize pane: Ctrl+n → arrow keys
  • New tab: Ctrl+tn
  • Floating pane: Ctrl+pw
  • Detach session: Ctrl+od

Floating Panes — A Feature tmux Doesn’t Have

Floating panes are what I use most. You’re in the middle of editing, need to run a quick command, and don’t want to lose your context:

# Press Ctrl+p then w
# A floating pane appears in the center of the screen — run your command
# Press Ctrl+p → w again to hide it and return to the editor

No tab switching, no loss of focus on your active pane.

Testing Session Persistence

The most important use case when working on a remote server over SSH:

# SSH into the server and start Zellij
zellij -s main

# Run a long-running process
watch -n 2 df -h

# Detach: Ctrl+o → d
# Close the terminal, SSH back in later

# Reattach — the process is still running
zellij attach main

Auto-Attach on SSH Login

Add this to ~/.bashrc or ~/.zshrc to automatically enter Zellij on every SSH login:

# Skip if already inside a Zellij session
if [[ -z "$ZELLIJ" ]]; then
    zellij attach -c main 2>/dev/null || zellij -s main
fi

The $ZELLIJ variable is set automatically when inside a session, so this snippet won’t cause an infinite loop.

Checking Resource Usage

# Check how much RAM Zellij is using
ps aux | grep zellij | grep -v grep

# More detailed
pidof zellij | xargs -I{} cat /proc/{}/status | grep -E 'VmRSS|VmSize'

On my company’s CentOS 7 server — after quite a bit of tuning to hit our performance targets — switching from screen to Zellij brought the memory footprint down from ~50 MB to ~18 MB for the same number of open sessions. On a 2 GB RAM server running multiple services, that difference is meaningful in practice.

Zellij vs. tmux — When to Use Which

  • New to terminal multiplexers: Zellij — faster to learn, no cheat sheet needed
  • Already comfortable with tmux and your workflow is working: No need to switch
  • Need floating panes: Zellij wins clearly
  • Need a rich plugin ecosystem: tmux still has the larger community
  • Old server with a low glibc version: Zellij’s musl binary just works; tmux sometimes needs to be built from source

Zellij is moving fast — each release brings meaningful improvements. The WebAssembly-based plugin system is still young but has strong long-term potential. If you’re setting up a fresh working environment, it’s well worth trying.

Share: