Thursday, May 24, 2012

tmux, a Better Terminal Multiplexer than screen

Recently I encountered a program called tmux which claims to be better at "terminal multiplexing" than screen. I did not have any idea about "terminal multiplexing", but I had been using screen for quite a few years now. tmux promises to be better that screen according to the tmux sourceforge page. This got me interested.

I installed tmux, and have been using it since last 2 weeks. My experience has been great except for a minor hiccup between vi and tmux. I thought of writing a small tutorial, but I feel there are better and more detailed ones that I would have the patience to write; not to mention we all "stand on the shoulders of giants". So I am going to point you to the online resources:
Finally, tmux is quite good and it gives some features not in GNU screen. Unfortunately, tmux is not as popular as screen, so you should be able to use both. Here is my contribution to the community, a cheat sheet with popular commands for both tmux and screen together. Please note that I use Ctrl+a as my tmux hotkey rather than the default Ctrl+b. Here is the thing you have to add to your ~/.tmux.conf to achieve this:
unbind C-b
set-option -g prefix C-a
Copy-pasting in tmux is also quite easy. You can copy from any part of the command window. Go to the copy mode by Ctrl+a PageUp. Move around the terminal using arrow keys. Ctrl+Space to start marking the text from where you want to copy. Use arrow key to select text. Alt+w to copy the text. Paste text using Ctrl+a ].

Thanks for reading.

No comments:

Post a Comment

I'd love to hear from you !