10 Powerful Zellij Commands for a Better Linux Terminal

I spent years inside tmux before I gave Zellij a serious week. The main difference hit me on day one: zellij commands are discoverable. The status bar at the bottom of the screen shows you every keybinding available in the current mode, so you stop keeping a cheat sheet taped to your monitor. Zellij is a terminal workspace written in Rust, it multiplexes panes and tabs like tmux does, and it has picked up over 34,000 stars on GitHub because it removes the memorization tax that scares people away from multiplexers.

This guide covers the zellij commands I use daily: panes, tabs, sessions, layouts, and the floating pane feature that tmux still cannot match without plugins. Everything here was tested on Debian 13 with Zellij 0.41.

Installing Zellij on Linux

Most distributions ship Zellij in their repositories now. On Arch it is pacman -S zellij, on Fedora dnf install zellij, and Homebrew users get it with brew install zellij. On Debian and Ubuntu the packaged version lags behind, so I grab the static binary from the Zellij GitHub releases page instead:

wget https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz
tar -xzf zellij-x86_64-unknown-linux-musl.tar.gz
sudo mv zellij /usr/local/bin/

If you have a Rust toolchain, cargo install --locked zellij works too, though compiling takes a few minutes. Verify the install with zellij --version, then start your first session by typing zellij.

Basic Zellij Commands for Panes and Tabs

Zellij organizes keybindings into modes. Press Ctrl+p to enter pane mode, and the status bar switches to show pane actions. The zellij commands you will use most in pane mode:

  • n: open a new pane in the largest available space
  • d: split downward, creating a pane below
  • r: split to the right
  • x: close the focused pane
  • f: toggle fullscreen on the current pane
  • w: toggle a floating pane over your layout

Tab mode works the same way. Ctrl+t then n creates a tab, r renames it, and the number keys jump straight to a tab by position. After any action, Esc or Enter drops you back to normal typing. That mode-based design means each key does one obvious thing, instead of the Ctrl+b prefix gymnastics tmux users know too well.

One habit worth building early: Alt+n opens a new pane from normal mode without entering pane mode at all. For quick splits during a debugging session, that single shortcut covers most of what I need.

Zellij Commands for Sessions

Sessions are where a multiplexer earns its keep on servers. Start a named session with zellij -s deploy, detach from it with Ctrl+o then d, and your processes keep running after you log out. Later, list what is alive:

$ zellij ls
deploy [Created 2h ago]
monitoring [Created 5d ago] (EXITED)

Reattach with zellij attach deploy. The part that surprised me is session resurrection. That EXITED session above is not gone. Zellij serializes sessions to disk, so even after a reboot, zellij attach monitoring rebuilds the pane layout and restarts the commands each pane was running. tmux loses everything on reboot unless you bolt on tmux-resurrect.

Two more session-level zellij commands worth knowing: zellij kill-session deploy ends a session cleanly, and zellij delete-session monitoring removes a dead one from the resurrection list. I run zellij attach --create work in my shell profile on servers, which attaches to the session if it exists and creates it if it does not.

Running One-Off Commands and Layouts

You can drive Zellij from outside the session, which makes it scriptable. zellij run -- tail -f /var/log/syslog opens a new pane running that command. Add --floating and the pane hovers over your current layout. zellij edit config.yaml opens the file in your $EDITOR in a fresh pane, which beats suspending your current process just to check a config.

Layouts take this further. A layout is a KDL file describing panes, tabs, and the commands running in them. Dump the default to see the format:

zellij setup --dump-layout default > ~/.config/zellij/layouts/dev.kdl

Edit that file to define, say, an editor pane on the left and two shells stacked on the right, then start it with zellij --layout dev. I keep one layout per project type: one for Laravel work with an artisan pane and a log tail, one for server maintenance with htop pinned to a corner. Combined with the session zellij commands above, a single shell alias can rebuild an entire working environment. The layout documentation covers the KDL syntax, including running commands on startup and setting pane sizes by percentage.

Why Zellij Commands Beat tmux Keybindings

The honest comparison: tmux is smaller, installed everywhere, and battle-tested for two decades. If you administer hundreds of machines you do not control, learn tmux first. My tmux commands guide covers the ten bindings that matter.

But on machines you own, Zellij wins on defaults. The status bar teaches you the zellij commands as you work, floating panes and session resurrection come built in, and the config file is readable KDL instead of tmux’s terse dotfile syntax. Pair it with a good shell history tool like Atuin and a fuzzy finder like fzf and the terminal starts feeling like a full working environment rather than a grid of dumb shells.

There is a cost. Zellij uses more memory than tmux, noticeable on a 512 MB VPS. The default UI also eats two lines of screen space for the status bar, though zellij options --simplified-ui true trims it down once the keybindings live in your fingers.

When Not to Use Zellij

Skip it on shared jump hosts where you cannot install binaries, and skip it inside another multiplexer. Nesting Zellij in tmux produces keybinding fights that waste an afternoon. Also check your terminal emulator: Zellij needs a terminal with decent Unicode support, and some minimal terminals render the UI borders as garbage.

For everything else, the switch took me about a week of muscle memory adjustment. Start with zellij, read the status bar instead of a manual, and the zellij commands stick faster than tmux bindings ever did. The official site has a tutorial series if you want a structured path through the advanced features.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts