18 ms·
Differences between Tmux vs Screen (2015)
- pthreads 9y agoI found this quite useful. I have been using screen for a while but my friends use tmux. They love it and couldn't be bothered to switch to screen and me vice versa. Based on the post I don't seen any strong reason for either to switch unless there are other reasons not mentioned in the comparison.
- colordrops 9y agoChange the tmux keybinding from ctrl-b to ctrl-a and it will feel mostly like screen, but you will get all the extra tmux functionality.
- Finnucane 9y agoThe article didn't seem to address customization. Every tmux tutorial I've seen recommends changing the keybindings for the prefix, splitting screens, and other frequently-used features. I haven't used screen, so I don't know how hard it is to do that with it. tmux works well enough for my needs.
- marcosdumay 9y ago> but you will get all the extra tmux functionality That is what exactly? I stopped using screen a few months ago, tmux offers a set of default key bindings that are adjusted to modern software, a new biding for copy and paste (so you can control what machine gets the command), and... I still didn't find anything more that is relevant. If he is used to screen, the key bindings will be more a problem than a solution¹, and the copy and paste thing is very niche. I don't think one has any good reason to migrate from one to the other. I did it to get to know tmux better, and really, that's exactly as much as I got. 1 - Unless you need to keep setting the bindings again and again.
- the_mitsuhiko 9y agoThe biggest feature of tmux is that it's natively integrated into iterm2. So I get scrolling and splitting like for a normal local session.
- patrec 9y agoYes, I'd really love to have a linux version of that. The biggest advantage of screen to me is that you can more easily fix the dumb prefix key (e.g. screen -e^z^z to use ^Z). This is handy for remote servers wherem you don't have your config files etc.
- mitchty 9y ago> That is what exactly? Vertical split panes was the biggest reason, but for myself, the end comes down to a config file I can actually read and unlike screen, tends to not have things like this in the man page: > Attach here and now. Whatever that means, just do it.
- dlgeek 9y agoScreen has supported vertical split panes for a long time now.
- mitchty 9y agoOnly for 4 ish years after the 4.0 release IIRC ~2013. Before that there was a patch floating around to do it: https://unix.stackexchange.com/questions/26685/how-to-split-window-vertically-in-gnu-screen https://unix.stackexchange.com/questions/26685/how-to-split-... Thats the main reason myself and a number of people I know ditched screen around that time. But I'd hardly call 4 years a long time.
- awirth 9y agoFor those confused, the linked patch page[1] has says that the patch got integrated into Debian (and Ubuntu) from 4.0.3-10, which means it would have been available since Lenny (2009). [1]: http://fungi.yuggoth.org/vsp4s/ http://fungi.yuggoth.org/vsp4s/
- Graziano_M 9y agoPane zoom is reason enough for me.
- tyingq 9y agoA few more differences not covered in the article.... License: Screen is GPL, Tmux is BSD. Screen has built in support for serial ports. Tmux adds a status bar by default, screen does not.
- carussell 9y agoThe article mentions vocal advocates (for tmux, although which doesn't matter). Meanwhile, I've always thought it was unfortunate that tmux and screen even exist. These two terminal multiplexers are really an end-run around unfulfilled wants in the way that the console subsystem should work by default. Want to be able to arbitrarily detach from a session? Well, then we should have OS-level APIs exposed that allow for that. Instead, what happened is the whole thing gets reimplemented in user space two levels deep (one for your GUI terminal emulator, then once again for the TUI terminal emulator you run inside that—either tmux or screen). And we've hobbled along on top of that for decades. To me, this is strongly reminiscent of software hematomas that Kiczales writes about. So I don't understand how anyone could be passionate about it, except maybe to passionately question why we're fine with continuing to do things this way, instead of stepping back and after a sober thought concluding that this whole thing is pretty silly. http://pbfcomics.com/comics/skub/ http://pbfcomics.com/comics/skub/
- tyingq 9y agoI suspect that the prevalence of graphical IDE tools, followed by container mania reduced the demand for anything like that. Graphical IDEs moved the idea of a session away from terminals, and the ephemeral nature of containers discouraged attaching sessions to them at all. So things like screen and tmux are now popular only with a niche crowd. Granted, it's one that has strong representation here on HN.
- AlphaWeaver 9y agoSomething else interesting is the program byobu, which acts as a wrapper for either tmux OR screen, depending on your preference, and makes session management and configuration easier.
- sverige 9y agoTmux has been getting lots of improvements lately; see e.g. http://www.tedunangst.com/flak/post/openbsd-changes-of-note-620 http://www.tedunangst.com/flak/post/openbsd-changes-of-note-... and subsequent updates. "Give tmux clients names. There have been lots of small improvements to tmux over the past six months which haven’t seemed notable in isolation, but shoutout to all the little fixes, too."
- willvarfar 9y agoI recommend xpra, which is like screen but for X apps (and the apps they launch, i.e. Start xterm and launch stuff from there and the whole Constellation of Windows is like a screen session you can attach and detach from), and you can view the sessions remotely and even in the browser!
- whack 9y agoI'll be honest. I use tmux everyday as an integral part of my workflow, but I find this whole idea of Windows and panes extremely cumbersome and complex. I just stick to a one-server-one-window/pane model, and create a new server for every new "window" that I want. I then connect to these multiple servers using multiple tabs on my terminal app, which I can then freely drag-drop-resize to my heart's content. If someone's looking for an entry-drug into screen/tmux, this is the easiest way to get started.
- jamesbvaughan 9y agoThis is exactly what I did for a long time, but after seeing so many friends and coworkers using panes effectively, I decided to finally jump in and commit some time to learning and customizing all the keybindings, and it has definitely paid off. Using panes and windows has become an integral part of my workflow. I would encourage you to give them a serious shot. You might be surprised!
- 43224gg252 9y agoYou can even enable the mouse to resize splits and switch between tabs in tmux/byobu: https://gfycat.com/SmallComplexGreatargus https://gfycat.com/SmallComplexGreatargus
- pthreads 9y agoNow, that is quite useful! I am going to try tmux just for that. Have been a screen user so far.
- mdaniel 9y agoIf you haven't already found a system you like, you may enjoy Teamocil https://github.com/remiprev/teamocil#examples https://github.com/remiprev/teamocil#examples I use it for tailing the logs of multiple servers in the same window, which is especially nice because ctrl-b,space will rotate the layouts if I need to see more horizontal or vertical for a second, and ctrl-b,z will full-window a pane enabling complete drill-down on one server A related project is tmuxinator https://github.com/tmuxinator/tmuxinator#tmuxinator https://github.com/tmuxinator/tmuxinator#tmuxinator but it didn't work exactly right for my use-case (I don't recall the specifics without being in front of my work machine)
- blazespin 9y agoCan you copy across scrollback in tmux? When I see an error and I scroll back to copy it to the clipboard I can't do this on screen (and scroll at the same time). Plus it conflicts with my emacs keyboard bindings.
- iopuy 9y agoDo you mean can you copy from the scrollback buffer switch to a new session and paste the results? If so then the answer is yes. Ctrl-Escape to enter, scroll up and find the string, space to start highlighting, then space to stop highlighting and you have copied it into the buffer. Then ctrl-[ to paste wherever.
- iopuy 9y agoIt is possible to configure Screen to have automatic window renaming although it requires modification of the PS1 environment variable.
- sirfz 9y agoWe usually have multiple people working in the same screen, each in a different window (on a remote server). Last I checked, this was not straight-forward in tmux (where everyone is switched to the same window whenever someone switches) and it seems to be still the case from what I see in the comparison table. This makes GNU Screen the preferred tool for us, for now.
- Graziano_M 9y agoYou can do this easily in tmux by having them work in separate sessions. This allows them to have their own set of windows.
- sirfz 9y agoI understand it's possible, but not as easy as screen -x.
- joobus 9y agotmux new-session -A -s mySessionName I use an ssh alias at work to always log me into my tmux session if tmux exists on the server ssh -t 'tmux new-session -A -s mySessionName || exec $SHELL -l' I shared this with a workmate and he just changed the session name and we both have our own tmux sessions.
- sirfz 9y agoThe point is to be able to work in different windows in the same session, not have two different sessions. I can see how something similar can be achieved in tmux but it would require getting used to a different workflow.
- edibleEnergy 9y agoScreen binding to ctrl-a and tmux users binding to ctrl-a so it feels more like screen is a bad idea imho. Ctrl-a (move to start of line) is one of the most convenient key combos on the command line. I bind my tmux key to ctrl-s, because I have never needed to freeze my screen.
- rasengan0 9y agoFirst I started with screen but quickly switched to the tmux-vim workflow. Then Comodo AV at work killed any chances of upgrading/building from source (long story) so I had to switch back to screen which i hadn't used in years. Now the only thing i really miss from tmux is the panes. screen splits is just not the same, but the productivity gains are still there. Oh and I miss that big clock too! C-b t
- winestock 9y agoAll of this goes to show that the Unix-haters were right. The Tenex line of operating systems from DEC had built-in session management in the 1970s. Unix still doesn't have it. All non-trivial terminal handling was kept in user-space. Therefore, programs had to make assumptions that are now hard-coded in their very design. To this day, the Linux and BSD kernels assume that they're talking to a VT100 with a few frills. The commercial Unix kernels were worse; I used a SunOS tutorial in the mid-90s that started me off on ed (yes, the standard editor; the man page even called it that without qualification) because Sun started out with an older version of BSD that assumed teletypes. This has had consequences. The major reason why microcomputers took off was because an Apple ][ running VisiCalc could do things that a terminal connected to a mini/mainframe computer could not do. Here we are, living in the future, where wristwatches have true color displays, and household appliances run webservers, but the correct, macho, hipster-approved user interface would be shamed by an Amiga 1000. /rant
- kev009 9y agoSad to see this downvoted, you make valid points about the importance of bitmapped display being a boon to microcomputers vs character or block oriented systems like minis and mainframes. The reality of modern times is more nuanced and I don't fully agree with you (for instance there has been movement in i.e. SCO UNIX in the late '80s, now fb/drm based terminals for linux/bsd but it is pretty slow going because most people embrace two distinct modalities with the terminal being a lowest common denominator and everything else being graphics (or even WWW). So in effect, most people use *nix as a personal minicomputer or distributed minicomputers, and the text interface is a lower level thing while they pump out X11 or Wayland or WWW for "modern" experience. In this role, tmux is about the ideal session manager I can imagine.. but that may be more of an "unknown unknown" than me knowing it is ideal.
- SakiWatanabe 9y agoDoes anyone have the copy/paste working properly 100 %? I am unable to find a solution of copy/paste setup that allows seamless integration with local clipboard. I am able to have tmux setup and working in OSX locally using reattach to user-namespace. However, I am struggling with a setup that works on remote machine. What do you do when you want to copy and paste between remote and local machine in tmux?
- Aissen 9y agoI only consider myself a newbie screen user, but I can see that the comparison has a few mistakes: - you can configure screen at runtime. Ctrl-A :<command> - you can have multiple "sessions" in screen, although it calls it windows: Ctrl-A C There might be other mistakes, but I'm not advanced enough to say.
- wnoise 9y agoYes for the first, no for the second. He means something quite different by session -- a stack of windows. And it does support it, by having multiple screen servers running at the same time.