Install and use tmux on CentOS

/ Category: Tutorials / Comments: 1

tmux centos
Spread the love

If you like to use the command line to manage your Linux Cloud VPS, you may find it time-consuming and complicated to switch between multiple terminal windows. Sometimes you may like to split the screen into multiple terminals and manage your server with ease. You can do this by using tmux. Tmux is a terminal multiplexer and today we will show you how to install it and use it on a CentOS Cloud Server.

It is recommended to start with a system update before installing anything on your CentOS. For that reason you can use the command:

yum update

Using this command, you can update all your system software to the latest version available. Now, let’s install tmux using the yum package manager.

yum install tmux

Once tmux is installed on your CentOS Cloud VPS you can start using it.

To start a new tmux session run this command:


This will start a completely new terminal screen called window. You can run multiple windows in a single tmux session. One big advantage of using tmux is that you can easily detach from the session and attach again. Also, as we have mentioned before, you can split the screen into multiple terminals.

To split the screen vertically type the following command:

Ctrl+b %

Now, you can switch between the terminals by entering the command below:

Ctrl+b o

To split the screen horizontally use:

Ctrl+b "

To create a new window enter:

Ctrl+b c

To move to the next window you can use:

Ctrl+b n

To move to the previous window you can type:

Ctrl+b p

And that’s it. As you can see, tmux is really simple to use, but it can be very important if you manage your CentOS Cloud on a daily basis.

To detach, enter the command:

Ctrl+b d

To list the tmux sessions use this command:

tmux list-sessions

And to attach to a specific session:

tmux attach -t number-of-session

Please note, you need to change the number-of-session with the actual number of the session you want to attach.

Sometimes you may need some extra help. In such circumstances,  you can use this command:

Ctrl+b ?

Of course you don’t have to do any of this if you use one of our Linux VPS hosting services, in which case you can simply ask our expert Linux admins to install tmux for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


  Comments: 1

Your feedback