Getting began with Tmux | Linuxize

This information will undergo the set up and fundamental utilization of Tmux to get you up and operating.

What’s tmux?

Tmux is a terminal multiplexer an alternative choice to GNU Display. In different phrases, it means which you can begin a Tmux session after which open a number of home windows inside that session. Every window occupies your entire display and might be break up into rectangular panes.

With Tmux you may simply swap between a number of applications in a single terminal, detach them and reattach them to a unique terminal.

Tmux periods are persistent, which implies that applications operating in Tmux will proceed to run even for those who get disconnected.

All instructions in Tmux begin with a prefix, which by default is ctrl+b.

This text can be obtainable in



Putting in Tmux

You’ll be able to simply set up Tmux utilizing the package deal supervisor of your distro.

Putting in Tmux on Ubuntu and Debian

Putting in Tmux on CentOS and Fedora

Putting in Tmux on macOS

Beginning Your First Tmux Session

To start out your first Tmux session, merely kind tmux in your console:

It will open a brand new session, create a brand new window, and begin a shell in that window.

As soon as you might be in Tmux you’ll discover a standing line on the backside of the display which exhibits details about the present session.

Now you can run your first Tmux command. For instance, to get a listing of all instructions, you’ll kind:

Ctrl+b ?

Creating Named Tmux Periods

By default, Tmux periods are named numerically. Named periods are helpful if you run a number of Tmux periods. To create a brand new named session, run the tmux command with the next arguments:

It’s at all times a good suggestion to decide on a descriptive session title.

Detaching from Tmux Session

You’ll be able to detach from the Tmux session and return to your regular shell by typing:

Ctrl+b d

This system operating within the Tmux session will proceed to run after you detach from the session.

Re-attaching to Tmux Session

To connect to a session first, you have to discover the title of the session. To get a listing of the at present operating periods kind:

The title of the session is the primary column of the output.

0: 1 home windows (created Sat Sep 15 09:38:43 2018) [158×35]
my_named_session: 1 home windows (created Sat Sep 15 10:13:11 2018) [78×35]

As you may see from the output, there are two operating Tmux periods. The primary one is called Zero and the second my_named_session.

For instance, to connect to session 0, you’ll kind:

Working with Tmux Home windows and Panes

If you begin a brand new Tmux session, by default, it creates a single window with a shell in it.

To create a brand new window with shell kind Ctrl+b c, the primary obtainable quantity from the vary 0…9 will probably be assigned to it.

An inventory of all home windows is proven on the standing line on the backside of the display.

Beneath are some most typical instructions for managing Tmux home windows and panes:

  • Ctrl+b c Create a brand new window (with shell)
  • Ctrl+b w Select window from a listing
  • Ctrl+b Zero Change to window 0 (by quantity )
  • Ctrl+b , Rename the present window
  • Ctrl+b % Cut up present pane horizontally into two panes
  • Ctrl+b ” Cut up present pane vertically into two panes
  • Ctrl+b o Go to the following pane
  • Ctrl+b ; Toggle between the present and former pane
  • Ctrl+b x Shut the present pane

Customizing Tmux

When Tmux is began, it reads its configuration parameters from ~/.tmux.conf if the file is current.

Here’s a pattern ~/.tmux.conf configuration with personalized standing line and few further choices:


# Enhance colours
set -g default-terminal ‘screen-256coloration’

# Set scrollback buffer to 10000
set -g history-limit 10000

# Customise the standing line
set -g status-fg inexperienced
set -g status-bg black

Primary Tmux Utilization

Beneath are essentially the most fundamental steps for getting began with Tmux:

  1. On the command immediate, kind tmux new -s my_session,
  2. Run the specified program.
  3. Use the important thing sequence Ctrl-b + d to detach from the session.
  4. Reattach to the Tmux session by typing tmux attach-session -t my_session.


On this tutorial, you discovered find out how to use Tmux. Now you can begin creating a number of Tmux home windows in a single session, break up home windows by creating new panes, navigate between home windows, detach and resume periods, and personalize your Tmux occasion utilizing the .tmux.conf file.

There’s tons extra to find out about Tmux at Tmux Consumer’s Handbook web page.


Germany Devoted Server

Leave a Reply