Ask HN: Which is better tmux or screen?
Also I would really like to know the scenario of how you use either.
Thanks,
AM
Also I would really like to know the scenario of how you use either.
Thanks,
AM
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.
screen /dev/ttyUSB0 115200I 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)
Objectively, I really don't know.
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 :)