Linux using sharp tools screen and Tmux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.