fbpx tmux Command on Linux: Multiplex Terminal with Panels | Certificação Linux

tmux Command on Linux: Multiplex Terminal with Panels and Sessions

📅 12/07/2021 ⏱ 2 min ✍️ Uira Ribeiro
Linuxcommands
tmux Command on Linux: Multiplex Terminal with Panels and Sessions
Exam Pass App — mais de 7.000 questões LPI, offline, em 5 idiomas, disponível no Android e na App Store
Available on
Google Play
Available on
App Store

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

Just like screen, tmux can be detached from the terminal and continue running, and then reattached to the terminal.

As soon as tmux is executed, it creates a session with a single window and displays it on the terminal screen. A status bar is displayed 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. Windows can occupy the entire screen, or be divided into one or more rectangular panes. Each window will be a pseudo-terminal.

If all sessions are terminated, tmux also terminates.

tmux accepts commands through the Ctrl b key combination.

Once in command mode, the most common options are:

  • ; Switches to the previous pane
  • c Creates a new window
  • d Detaches from the client
  • n Switches to the next window
  • p Switches to the previous window
  • x Kills the current pane
  • " Splits the window horizontally
  • % Splits the window vertically

To start tmux:

$ tmux

To create a new window with horizontal split, you should type Ctrl b, followed by the single quote "  : 

Tmux with two horizontal windows

Keyboard arrows can also be used to switch between panes. 

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

Like it? Share

Uira Ribeiro

Prof. Uirá Ribeiro

Chair do Board do Linux Professional Institute

After years of watching professionals waste hours on simple tasks because they didn't know the right Linux tools, I decided to teach.
Today I'm the author of most of LPI's official Learning Materials and mentor to over 14,000 certified students.

See my full story →

That was just one piece. The course teaches the whole path — from your first command to exam day.

Certificação Linux — a plataforma líder em certificações Linux no Brasil
WhatsApp