I have moved between tmux, byobu, and screen at various times in my career. I wouldn’t say one is better than the other, as they all do the job I need just fine (eg persistent session state on remote machines)
Dtach[1] does session persistence and nothing else—it leaves refreshing the screen to the program running inside it (it can send a ^L or a SIGWINCH upon reattaching but that’s it).
Could you say more about this? I took a look at this page and it seems to be mainly about having a window manager in a terminal: https://zellij.dev/about/
But I have a window manager, so all I ever want out of something like screen or tmux is a persistent remote session that survives network issues or me closing my laptop for a bit. Is that something that Zellij is better at?
In my experience? Yeah, Zellij's UX for session management vastly improves over that of screen and tmux, and it comes out of the box with much saner defaults. However, like tmux, it offers more than just session management, and also like tmux, it does it all while remaining rather small and performant.
Just try it and see if you like it. I've found that most of things I didn't like, mainly the default TUI borders and buttons, were far more easily reconfigured compared to tmux.
On mac, iterm2 has excellent tmux integration. You start tmux in control mode (tmux -CC) and it opens a new window for that session with all the multiplexing handled by the terminal instead. You get to use all of your normal terminal keyboard shortcuts and terminal interface.
It is the best of both worlds. And, yes, of course it works with a remote ssh session.
I use abduco for persistence - a very, very simple piece of code that -only- provides a persistent session, with one (configurable) keybinding to detach.
If you also want multiple terminals and screen splits and etc. it's designed to work with dvtm (by the same author) which provides that side of things.
Personally I tend to have a 2x2 grid of xterms on my local machine and four ssh connections to matching dtach sessions named project-{tl,tr,bl,br} but I suspect most people who aren't me would be happier with dvtm.
Yes you can define your own key bindings. The default is the same “prefix key” that ‘screen’ uses - Ctrl-b. Personally I like to use Ctrl-j because it’s easier to type and has fewer conflicts with shells and other things. Most of the key bindings that follow the prefix key seem natural to me, stuff like ‘c’ to create a new tab, ‘d’ to detach from tmux, ‘n’ to go to the next tab, etc., but all of that can be customized.
> The default is the same “prefix key” that ‘screen’ uses - Ctrl-b.
Isn't the default command key ctrl-A for screen? Which is why I've always had to change it (to ctrl-O which is much more sensible) because I can't live without ctrl-A in the terminal etc.
In screen, I just use a single backtick, as I very rarely use it for any other application in a terminal session (I prefer "$()" in shell, invariably edit TeX and Lisp in GUI Emacs, and the only only other thing that comes immediately to mind is opening the developer console in mpv and various video games).
I have moved between tmux, byobu, and screen at various times in my career. I wouldn’t say one is better than the other, as they all do the job I need just fine (eg persistent session state on remote machines)