Tmux is a C-language terminal that can simultaneously access and control multiple terminals in a Single Window. It is a tool similar to GNU Screen. With this function, you can manage multiple tasks and command line programs on Linux without opening multiple terminal windows at the same time, tmux can also be switched to the background and called to the foreground as needed.
Run the following command to install Tmux In Debian and Ubuntu:
www.bkjia.com@linux:~$ sudo apt-get install tmux
In CentOS and RHEL, it does not exist in the official software source, so you need to add the EPEL library. Add command:
[root@server ~]# rpm -ivh http://dl.Fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
After adding it, run the following command to install it:
[root@server ~]# yum install tmux
After the installation is complete, you only need to execute the following command to use it:
[root@server ~]# tmux
After executing this command, you will be transferred to the Tmux session. After being transferred to the session, you must press Ctrl + B to execute other commands. You can press Ctrl + B and then press "? "To view all supported commands.
Create a new Tmux session command:
Press Ctrl + B and then press "c" to create a new session.
On the new session page, you can see a green Tmux session record at the bottom. The session marked with * indicates the current session.
You can switch between the listed sessions, press Ctrl + B, press "w", then use the arrow to move to the session you need, and press Enter, you can switch to the corresponding session. To exit the current session, type the "exit" command.
To split two session windows, press Ctrl + B and then press "%.
To detach a session, press Ctrl + B and then press "d ". Returns the terminal screen from all sessions.
To restore the detached session, run the following command:
[root@server ~]# tmux attach
In this way, you will resume the link to the original session.
For more detailed commands, see the man of Tmux.
[root@server ~]# man tmux
Try this tool.
Read more: tmux 1.8 released, Linux terminal multiplexing