Ask HN: Which is better tmux or screen?
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 ] threadObjectively, I really don't know.
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.
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.
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)
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 :)