Ask HN: Which is better tmux or screen?

9 points by archmonk ↗ HN
Before you go on pointing me to archives or asking me to google understand that I have done that. The reason for asking is all the comparisons are by now old. I ask now because both might have progressed a long way. I personally use tmux but am not a pro user. I want to know if there is something that tmux has that screen doesn't have or vice versa. I would also like to know which is more light weight, more configurable.

Also I would really like to know the scenario of how you use either.

Thanks,

AM

9 comments

[ 3.5 ms ] story [ 32.8 ms ] thread
Use screen mostly, reason is simple, its the one i started using first and it's installed by default on most servers.

Objectively, I really don't know.

Same here. I use screen mostly because it's generally available, whereas tmux usually has to be installed.
I use screen, but there's no real reason for it but inertia. I don't know of anything it does better than tmux (except, perhaps, being available more places).

I use it, plus some scripts, to keep my work separated into various contexts. See https://github.com/dlthomas/config-files/blob/master/bin/ses... and https://github.com/dlthomas/config-files/blob/master/.bash.d...

The single biggest win is keeping a separate bash history per context. But it's also very handy to define context specific functions and aliases, cd at start to a relevant directory, etc.

Putting it all inside screen means that I can trivially start a new shell in the same context and gives a nice grouping.

Interesting I didn't know that in screen you could isolate bash history per context.
It's not screen doing the work.

Screen is just a process that spawns other processes, and like always those inherit environment variables. The script I have that starts screen defines a variable called "SESSION" beforehand, and that's used in my bashrc to set HISTFILE (and other things). Screen is just how I organize it.

What I've always missed going from screen to tmux is the ability to keep logs. "screen -L" will do the trick, while in tmux I need to install a plugin.
I've never used screen, but I love tmux.

I particularly love tmuxinator and using it to set up complex environments, like sourcing a virtualenv in python on all my windows/panes.

I use tmux for my main development environment, which usually has:

Window 1 (2 panes): vim and tests Window 2: bash console, used for git or one-off tasks Window 3: console (python/ruby REPL, usually) Window 4: localhost server (running whatever webapp I'm working on)

I don't think tmux can talk to serial ports. I am primarily a tmux user, but use screen if I need a serial console. e.g.

   screen /dev/ttyUSB0 115200
I've used both. I kinda like how tmux has a bottom bar by default. Both are super stable and I haven't had either crash on me ever.

Configuring both are kinda of a pain. I can never seem to get scroll to work properly in mac os x. I don't think I ever tried in screen. tmux is shorter character wise :)