Hacker News new | ask | show | jobs
by Yie1cho 475 days ago
For me, these are the main use-case differences.

1. if I start something which will run for a long time and/or the connection is unstable, I start a screen session on the remote node and start the program in it

2. if I want to check something (i.e. tail -f foo.log) on several servers at the same time, I start tmux on my machine, create 2,3,...,N panes and in each pane I ssh to the 1-1 remote server and start tail -f foo.log there. So I'll see the logs at the same time on several servers, just like if I had 1-1 monitor for each remote server.

1 comments

I use tmux specifically for your first example. I'm not a power user, but after trying screen and tmux, I didn't find anything missing in tmux (relative to screen) and I found it easier to do the things I was interested in. I also like having the ability to attach to an existing tmux session or start one if it doesn't already exist by using something like this: "tmux new -A -s me", which I have as an alias and "me" is just a name for the tmux session. I'm not sure if screen has this feature, but I found this single command lets me get going with a multi-window session without having to first check if I already have a session running.