tmux - a very simple beginner's guide

tmux screenshot

tmux lets you easily:

Why tmux?

Basic Terminology

tmux labels

tmux uses windows and panes.

Using tmux

To start tmux for the first time, enter tmux on the command line. You're now using tmux! If you get disconnected and want to reconnect to the same session, enter tmux attach on the command line.

Important Keybindings

Use these to control tmux when inside a tmux session. For all keybindings, press ctrl-b first, then press the key you want.

key what it does
ctrl-b, % split the screen in half from left to right
ctrl-b, " split the screen in half from top to bottom
ctrl-b, x kill the current pane
ctrl-b, <arrow key> switch to the pane in whichever direction you press
ctrl-b, d detach from tmux, leaving everything running in the background

This is an incomplete list; a more exhaustive list is available here.

Note: ctrl-b is the default prefix; I highly recommend changing it to ctrl-a. See ``Customization'' at the bottom of the page.


If you like tmux, you will probably want to customize it. In particular, you probably want to remap ctrl-b to something reasonable (like ctrl-a). This guide is a pretty good starting point. Additionally, my configuration file is available on GitHub. Put your config in ~/.tmux.conf and run tmux source-file ~/.tmux.conf from within tmux to reload it.

Advanced Stuff

This guide is purposefully oversimplified (and wrong) in some areas. The goal is just to get you started with tmux as fast as possible. If you find you like tmux, try a real guide -- this one really doesn't do tmux justice.

Copyright © 2013 Chris Kuehl. All content on this page is released under an MIT license.