Tmux is more customisable, but a lot messier out the box. It's much older so has picked up a little cruft along the way.
Zellij is newer so has the benefit of being a clearer implementation. But it's designed as an "out the bix" experience, not one you can customise to your hearts content.
Edit: if you did want to try out zellij, I should point out there's a "no install, try in shell" option on their website's main page which is a super quick way to get a taste!
I have definitely felt that. Customization wasn't necessarily straightforward - just required some time spent reading the docs.
I appreciate the heads up about the "no install, try in shell" option. I will make sure to take a look!
In particular, I'm curious about libtmux/tmuxp and how well it works to have a more declarative bringup than just a bash script launching things into the background and then attaching tmux windows to them.
And I guess the broader question of whether this approach is an evolutionary dead end— like does it just become a pile of hacks as one discovers the need for restart policies, backoffs, ordering, whatever other stuff that is built into a "normal" process manager like systemd or runit? If you do end up wanting to send process stdout/stderr elsewhere or do alerting, is that now annoying if those streams are "trapped" in tmux sessions vs being written into log files or the journal?
All the other examples I’ve seen where people have used it as a shortcut for daemonizing a service, it’s felt like just as much effort as writing a systemd service file.
I guess I could forgive people more back in the days of sysv-style initd. Writing those shell scripts was seldom fun. But with systemd, it’s literally a 5 minute task. And I say that as someone who dislikes numerous decisions made regarding the approach systemd takes.
Sure! I use tmux on most of my OpenBSD systems and copy the same .tmux.conf file around, but rarely tweak it other than to set a hostname.
My status bar is at the top and looks approximately like this:
--~ msg auth pf hostname. Mon Aug 04 15:05
* The first two windows (--) are regular shells.* The tilde window (~) is where I do stuff as root.
* The message window (msg) tails `/var/log/messages` and `/var/log/daemon`, or `journalctl -f` and `journalctl -k -f` on Linux.
* The auth window (auth) tails `/var/log/authlog` to monitor login attempts and usage of doas and sudo.
* The pf window (pf) runs a script to monitor the packet filter rules (pass, block, match).
* hostname is just the hostname. The period (.) means no mail, it turns to an exclaimation mark (!) when I have mail.
* Simple date/time.
This setup gives me quick access shells, important logs, mail status, date/time, and works the same on every server I manage. I add extra windows to tail other app logs as needed.
The only reason to still use tmux (or screen) is because you use remote sessions. All modern terminal emulators are already capable of doing tabs and panes (okay, maybe not sessions, but some can locally). If you're using tmux for this reason, stop. Go pick up a modern terminal like ghostty, Alacritty, or WezTerm.
But why tmux still exists today is because people are working on computers they aren't sitting in front of. Because I don't want to have to be running nohup or detaching, moving to the background, and resetting the session so error messages don't appear in my active instance. Hell, technically I can do this with vim and get something pretty similar to tmux by using the terminal. But that's a pain.
Tmux is for *terminals*
Like you mention, tmux sessions was one of the biggest features that I enjoyed about this tool: it does the job and does it well. Aside from that I love that I can use Vim-bindings with it, that it feels very similar to Neovim for me, so using them together is a no-brainer. Learning a couple of specific keyboard shortcuts is all it takes to make me productive.
I haven't needed to use a remote session yet like you note. While working with tmux locally I have learnt about all of these other features that I will definitely be looking forward to using once the opportunity arises.
I don't doubt that tools like ghostty, Alacritty, or WezTerm are great. I have heard lots about the first two. And I do intend to check them out.
What would you say is your favorite terminal and why as it relates to local development experience use? Are there features that these tools have that tmux lacks?
> What would you say is your favorite terminal
So far, ghostty. I do also like Alacritty and WezTerm, and think kitty is overhyped (and Warp is a privacy nightmare). A thing I really like about ghostty is it is incredibly easy to maintain. By far my smallest config file. Basically my theme and a few custom bindings. To be honest, there isn't a huge difference between all of them, with some being better at one thing than another, but I think ghostty gets things good all around.Btw, vim bindings should already be available in your emulator, without the need for tmux. You can set bash to use them (set -o vi) but I suggest migrating to zsh if you like using the cli. I'll also give you one fun command most people don't know. While holding control, press x then e (if you are already using zsh you might need to add `zle -N edit-command-line` to your rc file but <C-x><C-e> needs no config in bash). I guess I should also mention that in vim you can open a terminal (:help term)
> why as it relates to local development experience use?
All these emulators can do, locally, everything tmux can do and more. You just have to remember that a session is the same thing as a window. All these emulators have tabs and splits. So there is no real advantage to tmux. > Are there features that these tools have that tmux lacks?
First off, switch because your emulator is probably more resource intensive. It may also be missing modern features like being able to view images (see sixel, chafa, or the kitty graphics protocol), ligatures, and a lot of other features.Second, tmux lacks many of these modern features. Doing a passthrough can help but dealing with images is not a great experience. I have found no configuration where I can reliably view images and never have been able to produce images of the same quality. I always drop out of my session if I am entering a file browser like yazi or fzf (I'll use fzf but it limits the capabilities of previewing).
I prefer the idea of having one tool to manage everything: from local flow to remote sessions. And I usually do not view images in the terminal. But I'm willing to put them to the test and see if I like one of those more.
Do you think it's possible that someone might have a different workflow from you and tmux fits their use case in a way you haven't thought of?
That said, I still use tmux. Almost every day in fact. Because all my work is being done on a machine I'm not sitting in front of. This even includes at home. My main desktop is connected to a TV for videogames and movies. When I want to do work on it there's no difference if I'm sitting in front of my laptop or it other than it sitting in my livingroom keeps it cooler and gives it better air flow.
Edit:
Locally: my terminal emulator (ghostty) can do everything tmux can. I can do sessions (windows), panes, tabs, and all that. But with ghostty I also get images, a lower memory footprint (than stock emulator), lower CPU usage (than stock emulator), ligatures, and everything else. It is strictly better.
But I can't do {widows,panes,tabs} with remote connections. Hence, tmux. Which in that case, I will frequently give up capabilities (like images) for that.
So, even when nested, it's always clear what will happen. One nested session (two total) is manageable. Adding another gets annoying, but the need is rare.
Locally, I don't get the point. I can do tabs and splits. A session? That's another window. I can also hide that and use keyboard shortcuts to navigate towards it. Am I missing a local benefit?
The session is the thing I use, and I do use tmux every day, but I exclusively use it when in ssh as on a local machine I have everything I need. You mention the hybrid, but isn't the point that the connection is ephemeral? We don't exactly want to keep it alive unless we are actively using the connection, right? This is what I'm not understanding about your mixed scenario. What is the difference between what you do and me just opening another pane in ghostty and doing the ssh there. I can't detach from ghostty, but I can save the window state (or move to a different window in a different workspace or just cycle through windows like I would a session) so when I quit it it resumes, but honestly, I rarely quit it. Keeping a remote connection alive while there's no active usage seems like a waste and it's just going to disconnect when I walk away from my machine anyways. So what is the difference?
I do find sessions tend to get unruley easily, and more easily than windows just do to being hidden another level deeper. It's not too bad when single user, but I'd still suggest organizing tabs over multiple sessions, in most cases. That's because it is easy to just leave something like an editor open and accidentally overwrite files. Someone just logs back in after awhile and types :x into vim (or :x!) without thinking. It's also just too easy to let sessions stale. I haven't worked with a single person (myself included) who did not have a tmux session that was inactive for at least a month more than their last login time. (Better than all the hanging VSCode sessions though) That's like people using srun to run slurm jobs instead of submitting a batch job into the queue. That's totally fine to do when you're sitting in front of the sim but if you walk away and the code errors or just ends before your session ends then you're just hogging a machine that could be used (there wasn't even a benefit to this either!). Locally, it's pretty much the same thing except locally I can do all my tabs and splits and sessions without tmux.
Okay, but sessions are one of the best things about tmux.
Sessions aside, in my opinion tmux's flow is just better than terminal emulators I've tried. It slots into my brain in a way no terminal emulator's tabbing support ever has, and I have never found a terminal emulator who supported keybindings in such a sophisticated and seamless manner as tmux does.
I also concur with other commenters, who mention that having uniform multiplexing of shell windows between local and remote environments is super useful for muscle memory.
Yep, this is why I use the same .tmux.conf on my servers and my local machines. I don't have to care about my terminal emulator - I might be using a fully featured Windows Terminal or iTerm, or I might be using xterm or st on some spartan system. My navigation works the same everywhere.
> Okay, but sessions are one of the best things about tmux.
Locally or remotely? Remotely I fully agree. But remotely I can't open a new window and my machine doesn't have different workspaces. > Sessions aside
I'm curious about this actually. The opposite has been true in my experience. What keybindings are you missing? I can keybind essentially any script I want or any set of keystrokes. > uniform multiplexing of shell windows between local and remote environments is super useful for muscle memory.
I actually have the opposite experience. I mean I can bind ghostty splits to be identical to my tmux bindings, that's not an issue and trivial to merge. But I keep them separate because it contextualizes if I'm "here" or "there". Similarly I ensure that remote sessions have a different PS1 line so there are visual indications of where I am other than one small icon. Without this I find that it is easy to forget which machine I'm in. Had too many problems where I was running commands on one machine thinking I was in another.Then, there's the fact that some terminals capture too many keybindings and get in the way of some terminal code editors I'd like to use (e.g. recently I was again trying to use flow <https://github.com/neurocyte/flow> and its next-tab and previous-tab shortcuts clash with Ghostty's). If I had a terminal that 1) was nothing but a black box with the capability to display Unicode font glyphs and ligatures correctly, 2) works under Wayland, and 3) captures as few keybindings as possible, I'd use it locally with tmux and live happy.
Does it ever create issues for you if you need to type the backtick in the terminal?
I found that Ctrl-A does a great job: it is conveniently located in relation to other keys that I need to interact with after I activate the prefix, and is in general easy to use.
I've been using Ctrl+Q, it replaces an almost completely useless key combo (flow control if I'm not mistaken), and is easy to press.
But the after moving to Emacs and using Tramp for remote sessions, followed by VS Code with its built-in session management, I never feel the need to even leave the editor let along manage sessions
Host myhost
Hostname host
User user
RequestTTY yes
RemoteCommand tmux new -A -s foobar
alias ssh="ssh -o RequestTTY=force -o RemoteCommand='tmux new -A -s foobar'"
Typical Macintosh user.
I have started using nvim about a year ago, and that one also took three separate tries before it finally stuck with me :) After that, about 8 months ago I found tmux and had a harsh "first impression".
These days I enjoy using both of those tools and get more excited the more I learn about them.
EPendragon elaborate on this. It seems like you understand the shell enough to use it productively and customize it to be how you like it. The screenshot this quote is talking about looks like a shell? In what way is it dreadful, and in what way do your customizations make it not dreadful?
For example, it seems like a valid criticism that shells are not very discoverable and a prompt and blinking cursor can be intimidating to a noob, and that surely applies to tmux as well. But then changing the shortcuts doesn't really address that, does it?
To me it seems your article is either saying, "tmux is a pig, and here's me putting some lipstick on it," :) or the problems are not insurmountable, and the solutions are nice but not life-changing.
It's great that you like it better now, and we're all having fun chatting around it about how we configure our tools here on the Hacker News :) But I don't see why it's "dreadful". It's just.. computers, no? Tmux seems no more gatekeepy than any other aspect of computers. And I say this as someone who stopped using tmux a few years ago after getting super annoyed with it.
I was inspired by the "How to Configure tmux from scratch" post [1].
I came up with my use cases:
- I want to create sessions
- I want to open and close windows
- I want to create split panes
- I want to use vim-style text select
- etc.
Then I made mappings for the things I care about for my workflow specifically.
Before this, I would accidentally hit a keybinding while doing something else and not know how I got to that state, taking me out of flow to troubleshoot.
Afterwards, only the keybindings I have defined take action.
Now tmux fits like a glove. Because tmux is so stable, I haven't had to touch my config in years. It's worth the one time effort.
sjbr•3h ago
EPendragon•2h ago