Browsing through questions I found about tmux (I normally used GNU Screen). My question is what are pros and cons of each of them. Especially I couldn't find much about tmux.
|
|
From their website:
|
|||||||||||||
|
|
One difference is in how the two act when multiple terminals are attached to a single session. With screen, each attached terminal's view is independent of the others. With tmux, all attached terminals see the same thing. Say you have two terminals attached to a single tmux session. If you type ^B 1 into one terminal, the other terminal also switches to window 1. When you have two terminals attached to a single screen session, and you type ^A 1 into one, this has no affect on the other terminal. This is based on my experience with tmux 1.2; I see 1.3 is out but I didn't notice anything in the changelog about this behavior changing. If you like the screen behavior and want it in tmux:If your original tmux session is called "0" (the default), then you can do "tmux new-session -t 0") to start up a new independent session connected to the same set of windows, which can then have its own view. |
|||||||||
|
|
tmux is fairly new compared with GNU screen. Advantages / Disadvantages is a tough question, as both programs solve approximately the same problem. tmux is BSD licensed, however while screen is GNU GPL. This matters to some people. screen is more represented (on linux) at the moment, that is, you are more likely to find it on a given linux box than tmux. tmux is however more represented on OpenBSD as it is included as part of the base install, and his been for over a year now. Both programs allow you to do about the same thing, though the how of things is a bit more complex than that. Switching between the two is not overly complicated, as much of screens functionality has also found its way into tmux, though if you are a power user of either one, you will likely find some frustrations when switching to the other. As with any program, it really depends on your needs, and which you are more comfortable with. Give them both a try and see which you play nicely with. For more info on tmux see: |
|||
|
|
|
The biggest difference in my use has been that in Gnu Screen you can only split frames horizontally, whereas in Tmux you can split both horizontally and vertically. This is kind of a moving target, though as I here tell that vertical split is making it's way into screen. Other then that, things are about flat. |
|||||||||
|
|
I thought I would just mention about the
I am not using the keybindings part, but definitely find the status bars useful. Also you might find Screen Vs Tmux link useful. I think most of it is already mentioned by existing answers. |
|||||||
|
|
Drench raises an interesting point - the default behavior of connecting twice to the same session is different in tmux. However, if you want to attach twice and have an independent view of the windows in that session - start tmux with
That will create a new session for you, and attach the windows from the already existing session. If you didn't name your first session, you can add one with 'rename-session'. |
|||
|
|
|
I had troubles getting screen to support utf-8 and 256 colors but tmux worked out of the box. |
|||
|
|
|
I will take the liberty of adding one difference: tmux is ncurses based while screen does not draw additional elements. If someone use terminal emulator that supports scrolling (s)he will get scrolling with screen but not with tmux (at least in default configuration). The same thing applys for searching and similar features. |
|||||||||||
|
|
tmux is newer and several more features. I have found that good use depends on good setup. I use vi(vim) for editing (ruby on rails) and there's a few setup things to make that work well. Here's my ~/.tmux.conf file with lot of helpful setting:
|
|||||
|
