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:
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:
Now, you can switch between the terminals by entering the command below:
To split the screen horizontally use:
To create a new window enter:
To move to the next window you can use:
To move to the previous window you can type:
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:
To list the tmux sessions use this command:
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:
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.