On-line operation to increase productivity with tmux

Source: Internet
Author: User

For people who often operate on-line, there is a kind of annoyance, is in the operation process, something left a bit, the computer automatically sleep, and then the network disconnected, this time the task will run again, very vexed.
Tmux can solve this problem. Tmux can be seen as a virtual screen, not affected by the broken network. If the network is off, just reconnect the screen, and the text on the virtual screen is still there.

Common commands for Tmux are as follows:

new-s-t session_nametmux lsControl+B d: 暂时断开连接,正在执行的任务不会退出Control+B PageUp/PageDown:上下滚屏

How to improve work efficiency with TMUX? That is to automatically open the Tmux when working on a springboard machine. My way of working is like this.
First define alias on the local computer and connect the springboard as a command:alias gate=‘ssh [email protected] ~/opentmux.sh‘

~/opentmux.shthe content on the springboard is as follows:

#!/bin/bash# 找出未连接的屏幕1‘^[^:]+‘`# 如果找不到未连接的屏幕,就新建屏幕if"$session_name"then    tmux    exit# 连接现有屏幕else    "$session_name"    exitfi

In this way, each time you connect a springboard machine, you automatically look for the Detach status screen and then automatically attach. If all are attach, create a new window.
This way even if the network is broken, the next time connecting the Board machine, the task is still in operation. For frequent on-line operation can be unaffected by the broken network, greatly enhance the operation experience.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

On-line operation to increase productivity with tmux

Related Article

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.