關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • Linux 使用 TMOUT 設定自動斷線

    Posted on June 9th, 2011 Sam Tang No comments

    Linux 下可以透過設定 TMOUT 變數,來實現當用戶在特定時內沒有任何動作就終斷連線,設定指令為:

    export TMOUT=300

    以上指令設定預設終斷連線時間為 5 分鐘,也可以編輯 ~/.bash_profile 或 /etc/profile 進行設定。

    如果要取消 TMOUT 的設定,可以用以下指令實現:

    export TMOUT=0

    unset TMOUT

    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word