Linux下ctrl+s假死恢複__Linux

來源:互聯網
上載者:User

使用SecureCRT時,螢幕假死的問題

使用SecureCRT時,偶爾發生螢幕假死,不能輸入等情況。

後來發現,只要資料ctrl+s,就會假死;輸入ctrl+q就可以恢複過來。

ctrl+s是一個古老的shell修飾鍵,再輸入ctrl+q就可以恢複了。
When you use terminal/putty/secureCRT, you can mistakenly type ctrl-s. It makes terminal freeze. It is because ctrl-s is an flow control signal to terminals. To resume the terminal, you should push ctrl-q.

This is not very convenient solution. We use ctrl-s a lot, especially for EMACS users. To prevent this, you can add this line in your login script (e.g. .bashrc)

stty stop undef
You can confirm this setting using this command.

stty -a
The stop section should be undef.

SecureCRT作為著名的SSH用戶端,經常用於登陸遠程伺服器。在上面編輯文本,特別是用vi開啟兩個文本,並且需要切換時,很容易出現卡死的現象,不能接受任何的鍵盤輸入。很是鬱悶。以前每次遇到這個問題,我只有關掉那個session重新開啟一個。這次又遇上,是在不能忍,試著解決一下。

仔細觀察會發現,在vi下切換文本“ctrl+w+w”時,很容易輸入成”ctrl+s”。隨便拿一個session試試就發現,果然是ctrl+s在作怪。只要輸入這個,就會卡死。搜尋了一下,發現果然是有原因的:

CTRL-S and CTRL-Q are called flow-control characters. They represent an antiquated way of stopping and restarting the flow of output from one device to another (e.g., from the computer to your terminal) that was useful when the speed of such output was low. They are rather obsolete in these days of high-speed networks. In fact, under the latter conditions, CTRL-S and CTRL-Q are basically a nuisance. The only thing you really need to know about them is that if your screen output becomes “stuck,” then you may have hit CTRL-S by accident. Type CTRL-Q to restart the output; any keys you may have hit in between will then take effect.
ctrl+s是一個古老的shell修飾鍵,在輸入ctrl+q就可以恢複了

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.