3 ms·
Can anyone provide some information on the differences between tmux and screen? Are there significant features missing from one or the other? The more "objectiv
by zvr 2y ago
Can anyone provide some information on the differences between tmux and screen? Are there significant features missing from one or the other? The more "objective" (or unbiased) the better. As an analogy, I know of some features available in neovim not available on vim; they are not important for me, so I continue to use vim. On the other hand, the vim features not available in vi made me switch.
I use screen, but whatever I have read till now on comparison seems to point more to personal preferences.
- Malcolmlisk 2y agoThis is a good question. Some user made a good list in superuser https://superuser.com/questions/236158/tmux-vs-screen https://superuser.com/questions/236158/tmux-vs-screen. For me, it's because it's more common to use tmux and you can find from legacy configs to modern ones. So, for me, that I have not studied IT (and now I work as a programmer) it's essential to find basic configurations all over the place to have an anchor. But, as always... Use whichever works for you. Don't think in the "best" or the "most efficient" which is just youtube propaganda. Use whichever works for you and makes you feel like home. If that's 98's microsoft word... then embrace it and be proud to have an opinion.
- sirfz 2y agothere's truecolor support (which is now available in screen 5) and the other thing is clipboard support (not sure what it's called exactly) which basically allows you to directly copy text from screen (or say, neovim) even from remote sessions. Can't think of anything else personally (oh there's undercurl support if you care about that). I find screen to be more stable than tmux but can't say I had any issues with tmux in the past couple of years (but it bothers me that tmux sessions share the initial environment the first session was launched from iirc). Right now it's the clipboard support that makes me use tmux over screen.
- somat 2y ago> but it bothers me that tmux sessions share the initial environment the first session was launched from. It does do this, but I am curious what would be better? I heard this complaint before and It baffles me. let me explain. environments are... sticky, a child process inherits it's parent processes environment. so the tmux server starts and inherits the environment from the shell that started it, then each pane inherits the environment from the tmux server. As far as I can tell you want each pane to inherit the environment from somewhere else but can't figure out why or how that would happen. My best guess is that you want tmux-attach to stash the environment it was ran in so that tmux could then use that when making new panes. my second guess is that you want tmux to use the current pane as the parent process for a new pane. both of which sounds like it would be even harder to control the tmux environment.
- sirfz 2y agoAny changes to ~/.bashrc or even ~/.tmux.conf would not reflect in any newly created session unless you terminate all sessions and start afresh. In screen, every new session starts from the current host environment which is more convenient
- somat 2y agoNot sure what bash is doing but tested with ksh and it runs and picks up changes in both .profile(login shells) and .kshrc(all shells) so I don't think it is tmux that is interfering with that aspect. In fact I was a bit surprised that .profile ran on every created pane, as naively I would not have thought that would be a login shell. not sure about the rest, I did read the man page again, and wow there is a lot more configurabilty than I first thought, however I found nothing great, the best I could come up with is. bind c 'source-file /home/xxx/.tmux.conf; new-window'
- kennysoona 2y agoI use it because I like seeing the 'screens' I have open no matter what screen I'm on. Screen itself has no such feature afaik.
- Yie1cho 2y agoFor 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.
- venusenvy47 2y agoI 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.