Skip to content

Instantly share code, notes, and snippets.

@hidakatsuya
Last active November 3, 2023 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hidakatsuya/007ead1a5ce22d91f7c5765881aae85d to your computer and use it in GitHub Desktop.
Save hidakatsuya/007ead1a5ce22d91f7c5765881aae85d to your computer and use it in GitHub Desktop.
GNU screen Cheat Sheet

Escape Key

C+t (default C+a)

Window

  • C+t c 新しい window を作る
  • C+t " window リストを表示する
  • C+t C+t 一つ前の window に切り替える
  • C+t n 次の window へ切り替える
  • C+t p 前の window へ切り替える
  • C+t <number> number の window へ切り替える
  • C+t k window を kill する (not recommend)
  • C+t \ 全ての window を kill する (not recommend)

Session

  • screen -S <session_name> session_name の session を作成する
  • C+t d 停止 (detach) する
  • screen -x 現在の session を再開 (attach) する
  • screen -r <session_name> session_name を再開 (attach) する
  • screen -ls session リストを表示する
  • screen -wipe dead 状態の session を閉じる

Copy & Paste

  • C+t [ コピーモードへ
    1. Enter でマークして範囲を指定
    2. Enter で範囲をコピー
  • C+t ] 貼り付け

Misc

  • C+t :quit 全ての window, session を終了
  • C+t :source ~/.screenrc 設定をリロード

Help

  • C+t ? ヘルプ

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment