telnet or ssh telnet to Linux, if the connection is not normal interruption, reconnect, the system will open a new session, unable to restore the original Session.screen command can solve the problem. The screen tool is an end-multiplexer, in essence, which means you can run multi-terminal applications using a single terminal window.
Screen-ls
Screen
There is another tmux that is also very powerful.
Tmux can configure its own shortcut keys in the ~/.tmux.conf file.
SET-G prefix ^d
Unbind ^b
Bind D Send-prefix
Bind k selectp-u # Select the upper pane
Bind J selectp-d # Select the lower pane
Bind H Selectp-l # Choose the left pane
Bind L SELECTP-R # Select right pane
Build D source-file ~/.tmux.layout #这个是使用快捷键直接生成相应的layout
The layout file is. tmux.layout
Selectp-t 0 #选中第0个窗格
Splitw-h-P #将其分成左右两个
Selectp-t 1 #选中第一个, the right one.
Splitw-v-P #将其分成上下两个, so it becomes the layout in the diagram.
Selectp-t 0 #选回第一个
Then tmux into:
Ctrl+d "-Split pane horizontally
Ctrl+d%-Divides the current pane vertically
Ctrl+d arrow keys-Toggle between panes
Ctrl+d, and do not release CTRL, arrow keys-resize panes
Ctrl+d C-(c) reate generate a new window
Ctrl+d N-(N) Ext moves to the next window
Ctrl+d P-(p) revious moves to the previous window.
Ctrl+d space Bar-using the next built-in layout
Ctrl+d Q-Displays the number of the separator window
Ctrl+d O-Jumps to the next separator window
Ctrl+d &-Exit Tmux after confirmation
Original: http://blog.csdn.net/hongchangfirst/article/details/37818947
Author: Hongchangfirst
Hongchangfirst's homepage: http://blog.csdn.net/hongchangfirst
Linux using sharp tools screen and Tmux