Read time: 1 minute

tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen.  tmux may be detached from a screen and continue running in the background, then later reattached.

This tool is similar to GNU screen.

Run tmux by:

tmux

To detach or minimize: ctrl+b then d to attach again:

tmux attach

If you’ve currently more than 1 session running, then you can rename the sessions. First of all, we need to check the list by:

tmux list-sessions

Below is the result of list of sessions:

0: 1 windows (created Mon Jul 20 03:08:26 2015) [85x8]
1: 1 windows (created Fri Jul 24 02:14:02 2015) [85x8]

If you want to rename a session, type:

tmux rename-session -t 0 newname

Then we can attach to a particular session by:

tmux attach-session -t newname