February 22, 2017

Muck It Up With Tmux

Using and Configuring Tmux

  • March 28, 2011
  • By Joe Brockmeier

Managing multiple sessions in the same terminal? Consider Tmux, a handy "terminal multiplexer." Joe Brockmeier takes a look at its basic usage and configuration on ServerWatch.

To start tmux, just run tmux or tmux new-session if you're feeling verbose. Then you'll have a session with one window and your usual login shell. To add a second window, run Ctrl-b c. (Same thing if you want a third, fourth, and so on.)

If you'd like to split your window into panes, each with its own shell, run Ctrl-b " to split the window into two panes. That will split your tmux session horizontally. If you prefer vertically, you can use Ctrl-b %. To move between panes use Ctrl-b o.

Now, all of the windows that are running in tmux are in one session. If you start a second instance of tmux in another xterm or virtual console on the same machine, you've got a second session. You can see all of the sessions that are running by using Ctrl-s. This will give a menu of all sessions and show how many windows are running in each session.

Joe 'Zonker' Brockmeier is a freelance writer and editor with more than 10 years covering IT. Formerly the openSUSE Community Manager for Novell, Brockmeier has written for Linux Magazine, Sys Admin, Linux Pro Magazine, IBM developerWorks, Linux.com, CIO.com, Linux Weekly News, ZDNet, and many other publications. You can reach Zonker at jzb@zonker.net and follow him on Twitter.


Read "Get Hands-on With Tmux" at ServerWatch

Sitemap | Contact Us