Zellij, an alternative to screen and tmux
Posted on December 5, 2021 by Adrian Wyssmann ‐ 3 min read
Terminal window managers are very helpful. I found Zellij, which seems to be a very nice alternative to tmux and screen
In Linux, terminal window managers improve the work on the shell by allowing to have persistency, multiplex a terminal window and session sharing. Most prominent screen managers are screen - released in 1987, tmux - released in 2007, and byobu - released in 2009.
- Persistency: When a network connection is dropped, it typically terminates all programs the user was running (child processes of the login session). With a terminal manager this does not happen, but rather the session is just detached, which allows you to reattach the session later and continue working from where they left off. This is especially useful if you are working on a unstable network connection.
- Multiple Windows: Basically, you open a single window on a terminal, from where you could create new windows or split the window in multiple areas. Programs in the window(s) run independently of each other and also run in the background, even so the window is not visible. The programs also run when the whole session is detached from the user’s terminal, as mentioned above.
- Session Sharing: Multiple computers can connext to the same session at once, enabling collaboration for multiple users.
While I personally use tmux, I always struggle to remember the keystrokes necessary to navigate among the windows, I found with zellij a nice alternative which makes the usage imho very easy. It offers the following features:
- panes and tabs: You can split your terminal in different panes and tabs
- layout engine: You can define a map of panes in a yaml file and load it when Zellij starts
- plugins: Zellij can be extend by plugins - however currently there are not much available
Nevertheless, if you have a look at the interface it’s pretty clear how you can work with Zellij, when you are using the default layout:
The default layout takes use of the tab-bar and status-bar plugins:
Based on this, you can extend the layout definition and do something like this
So if you go to tab 3
you would see this arrangement:
You can also customize the keybindings and the apperance aka themes. As you see, it’s a nice alternative to tmux so you might give it a try.