Install and use tmux in CentOS and centow.ux
Tmux introduction:
Tmux is a substitute for Screen implemented by BSD. Compared with Screen, tmux is more advanced: it supports Screen splitting and has rich command line parameters, allowing it to flexibly and dynamically perform various la S and operations. It can start up with a command (powerful configuration), terminal on the left, Vim on the right, and gdb on the bottom-in short, it is a flexible IDE and you can still configure it.
The effect is as follows:
Installation:
Next, let's talk about how to install tmux.
Environment: Centos
CentOS Software Installation tool is not apt-get or yum
Install some supported components before installing tmux:
yum install libevent-devel ncurses-devel
The next step is to download the source code package and install it. Here we should note that the latest version of tmux is 1.8 so far, but after testing 1.8, there will be a small problem during compilation, therefore, we recommend that you select a lower version, 1.6/1.7.
wget http://downloads.sourceforge.net/tmux/tmux-1.6.tar.gztar zxvf tmux-1.6.tar.gzcd tmux-1.6./configuremakemake install
This is OK!
Usage:
C Represents the ctrl key
Tmux command and use tmux # enable tmuxtmux ls # display the list of existing tmux (C-B s) tmux attach-session-t number # select tmux C-B c to create a new window C-B n to switch to the next window C-B p to the last window C-B l window, unlike the previous window, who will test who knows that c-B w uses the up/down key to select the number of C-B sessions opened in the current window and directly jumps to the window where the number you press is located C-B & exits the current window C- after B d temporarily disconnects the session, you can also split it into a window (horizontal), C-B %, and a window (vertical) c-B o switches C-B in a small window (direction key) C-B! Close all small windows C-B x close the small windows C-B t clock C-B pageup/pagedo at the current cursor