Tmux vs. iTerm2 split panes

Go To


Why should I use tmux when iterm2 has split panes?

I have never used tmux, and want to know if there are advantages to using that in my workflow instead of the split pane features iterm2 has.

I really like the dimming of inactive windows that iTerm2 split panes offers. Does tmux do something similar?

What are the advantages/disadvantages of each?

2012-04-04 16:40
by thatmiddleway
I don't see how this is off topic. I read the faq. I have to dissagree with josh, devin and robert - thatmiddleway 2012-04-06 14:50
If you agree that it should be reopened, nominate it! It's next to the edit link under the tags for the question - thatmiddleway 2013-02-11 20:38
tmux can be used on a variety of operating systems (including Windows) allowing you to shift systems and still feel at home. iTerm is macOS only - Niko Bellic 2017-11-29 21:33


There is another advantage of tmux: what happens if you accidentally close iterm2? If you do it really by accident, you want to reopen everything again. With tmux it is normally as simple as reattaching session without losing anything. Most terminal emulators send SIGHUP to all children which terminates them by default and thus you lose unsaved data (at least, shell and vim command history and other data stored in viminfo) and running processes and thus reopening means rerunning everything.

2012-04-04 18:09
by ZyX
That's awesome. Definitely can't do that with iterm - thatmiddleway 2012-04-04 18:34
If you use tmux for iterm2's split panes, it works exactly the same way as tmux, it just draws using iterm2's UI - prater 2013-02-19 18:29
FWIW, now iTerm2 can remember your opened sessions (even with the screen output). So it will reopen everything even after rebooting the computer - Aziz Alto 2016-12-30 04:52


iTerm2 can use tmux for it's split panes. Personally, I'm used to tmux by itself at this point, so I've not leveraged this ability extensively - but if you are used to iTerm2 split panes, you can get the benefits of tmux (mostly screen-like session saving) with the iTerm aesthetics.

2012-04-04 18:27
by prater
Thanks for the link, I'll definitely read through that - thatmiddleway 2012-04-04 18:34
the link is dead.. - albttx 2016-06-02 09:51
I fixed it thank you - prater 2016-06-02 16:23


My approach (not based on any particular insight) is to use iTerm tabs and panes to separate servers, and screen / tmux on the server to persist sessions.

I don't often have anything of importance running locally, but often do remotely.

2012-04-04 19:58
by MattK
seems like a good strategy. Interesting to hear you use both - thatmiddleway 2012-04-04 20:18


Never used iterm2, however I have played with tmux a little and there are several articles about using tmux and vim together. These articles show how you can control a tmux session via the tslime plugin, and others, from Vim. What's nice about it is that you can run a command in Vim to compile your files, run unit tests, etc. without every leaving Vim, but you see the command run in the other tmux pane.

Apologies for not being a complete answer, but hopefully it helps point you in the right direction.


2012-04-04 17:03
by blockcipher
My question arose this morning when listening to an episode of the changelog about tmux. That was mentioned, but I didn't realize it worked like that. definitely worth looking into - thatmiddleway 2012-04-04 17:07