Skip to content

tmux command on Linux (terminal multiplexing)

The tmux command in Linux is another terminal multiplexer, such as screen. It allows multiple terminals to be created, accessed, and controlled from a single window.

Like the screen, the tmux can be disconnected from the terminal and continue running, and then reconnected to the terminal.

Once tmux is executed, it creates a session with a single window and shows it on the terminal screen. A status line appears at the bottom of the terminal indicating the current session.

A session is nothing more than a set of pseudo-terminals controlled by tmux with one or more windows. The windows can occupy the entire screen, or be divided into one, or more rectangular panels. Each window will be a pseudo-terminal.

If all sessions are terminated, tmux also ends.

tmux accepts commands using the Ctrl b key combination.

Once in command mode, the most common options are:

  • ; Switch to the previous panel
  • c Create a new window
  • d Disconnect from the client
  • n Switch to the next window
  • p Switch to the previous window

x Kill the current panel - **“**Divide the window in half horizontally

  • % Divide the window in half vertically

To start tmux:

$ tmux

To create a new window with horizontal division, you must type Ctrl b, followed by the single quote ”:

Tmux with two horizontal windows
![](https://learnlinux.com.br/editor/files/tmux_pt.jpg)The arrow keys can also be used to switch between panels.

Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.

Did you like it?

Share