Starting tmux

Starting tmux is as easy as typing

 
$ ​tmux
images/basics/tmux_basic.png
Figure 2. New tmux session

from a terminal window. You’ll see something that looks like Figure 2, New tmux session appear on your screen. This is a tmux “session,” and it works just like your normal terminal session. You can issue any terminal command you’d like and everything will work as expected.

To close the tmux session, simply type

 
$ ​exit

in the session itself. This closes tmux and returns back to the standard terminal.

But, unless you’re only using tmux for a very brief period, this isn’t the best way to work with sessions in tmux. We can instead create “named sessions” that ...

Get tmux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.