when performing command operations with a Linux terminal, it is often ctrl+alt+t to open multiple tabs for different operations. If you are performing one operation, you need to focus on the execution results of another operation. Let the operation complete pop up a dialog box? Make a sound prompt operation complete? These methods have been used, the trouble is to jump between the different tabs, and the label more easily forget which label is what to do. Through Google, found a tool: Tmux, after the installation of the trial effect is as follows (three windows):
Compiling the installationEnvironment: Redhat 5.x/centos 5.x1.The default system path has been installed for libevent1.4.x or libevent2.0.x. git clone git://git.code.sf.net/p/tmux/tmux-code Tmux
CD Tmux
SH autogen.sh
./configure && Make
2. Libevent is not installed. 1) Download Libevent source code from http://libevent.org/install (install to system default path requires root permission):/configure && make
Make Install2) Tmux source code to compile the installation. git clone git://git.code.sf.net/p/tmux/tmux-code Tmux
CD Tmux
SH autogen.sh
./configure && Make
3. Libevent has been installed in a custom path. git clone git://git.code.sf.net/p/tmux/tmux-code Tmux
CD Tmux
SH autogen.sh
Dir=/home/nieyong/local/libevent-2.0.11-stable
./configure cflags= "-i$dir/include" ldflags= "-l$dir/lib"
Make
encountered byError:
1. Errors that may occur when compiling Tmux
Control.c:infunction' Control_callback ': control.c: the: warning:implicit Declaration offunction' Evbuffer_readln ' control.c: the: Error: ' EVBUFFER_EOL_LF ' Undeclared (first useinchThisfunction) CONTROL.C: the: Error: (each undeclared identifier are reported only ONCECONTROL.C: the: Error: foreachfunctionIt appearsinch.) CONTROL.C: the: Warning:assignment makes pointer from integer without a cast Make: * * * [CONTROL.O] Error1
The reason is that the version used by Libevent is too low, tmux1.8 requires libevent>= 2.0.10-stable
2. Errors that may occur when running Tmux
while loading shared libraries:libevent-2.0. 5 Object file file or directory
Workaround: Create the corresponding symbol link
32bit System
LN -s/usr/local/lib/libevent-2.0. 5 /usr/lib/libevent-2.0. 5
64bit system
LN -s/usr/local/lib/libevent-2.0. 5 /usr/lib64/libevent-2.0. 5
Some commands:
Press ctrl-b C
This creates a new window, and then the screen cursor moves to it. Now you can run your new app in a new window. You can change the name of your current window. In the current example, I run the top program, so top is the name of the window
If you want to rename, just press:
Ctrl-b
The status bar will change, and you will be able to rename the current window
Once multiple windows are created in a session, we need to move between these windows. Windows are organized like arrays, starting with 0 to mark each window with numbers, and want to jump to the rest of the window quickly:
Ctrl-b < window slogan >
If we name the window, we can use the following command to find them:
Ctrl-b F
You can also list all windows:
Ctrl-b W
Switch to a different window in the following order:
ctrl-b N(to the next window) ctrl-b p(reach the previous window)
To leave a window, you can enter exit or:
Ctrl-b &
Before closing the window, you need to confirm it.
Divide the window into many panels
Sometimes you need to look at the log file while you work in the editor. It's really helpful to keep track of the logs while editing. Tmux allows us to divide the window into many panels. For example, we can create a console to monitor our servers, and use an editor to construct a complex development environment so that it can be compiled and debugged at the same time.
Let's create another Tmux session and let it work as a panel. First, if we were in a session, that would be out of the TMUX session:
Ctrl-b D
Start a new session called "panes":
$ Tmux new-s panes
You can split a window horizontally or vertically and split the input horizontally:
Crtl-b "
Now you have two panels, and now we split them vertically:
Crtl-b%
There are also two additional:
To move between them:
Ctrl-b < cursor keys >
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Linux manual installation of Tmux compilation and problems encountered