How to use the screen command

Posted by admin on February 19th, 2009 filed in Linux

  • To start a new sub session (Virtual Session) type
    ((ctrl+a) c)

  • To switch between sessions…
    ((ctrl+a) )

  • To switch between your previous session and the current one..
    ((ctrl+a) a)

  • To kill a frozen session…
    ((ctrl+a) k)

  • To see a list of available commands…
    ((ctrl+a) ?)

  • To see a list of virtual terminals you have open..
    ((ctrl+a) “)

  • To Detach from a screen session and not lose any of your virtual terminals…
    ((ctrl+a) d)

  • To view current screen sessions once you are logged out of screen.. “screen -list”
  • To reattach to an Attached session (Session that was not detached properly) “screen -D -r <11546.pts-5.hostname>” (session name from the output of the screen -list command)
  • To reattach to a detached session.. “screen -r <11546.pts-5.hostname>” (session name from the output of the screen -list command)
  • To end that session you can either type “exit” or a
    (ctrl+d)

Leave a Comment