Screen (Part 2)


One possible usage for screen is to run big tasks on a remote computer

  1. E.g. Login via: ssh -l user -X
  2. start screen via: screen or you can specify a meaningful name: screen -S peterssession
  3. You will see a welcome message. Just hit return and you will see the konsole again.But now screen is ‘active’ and
  4. You can run a big task
  5. To create another window (e.g. for your favorite editor) just hit “CTRL a” followed by c. Try to switch between the windows with CTRL a, CTRL a
  6. Now you can detach from those two windows with CTRL a, CTRL d. After this it is possible to disconnect, although the remote computer will work with your big task. And you can even shutdown your local machine, if the big task does not need a x-server. The big task will run on the server in ‘background’.
  7. Reattach to the previously session (where we created 2 windows) with: screen -r or if the session was not detached you should use screen -x if the -r does not work.
  8. Now to ‘really’ logout just type ‘exit’ or press CTRL D for every windows you created. Or force screen to exit with CTRL a, CTRL \

Command overview

  • CTRL a, ? = prints the help
  • CTRL a, c = creates a new window
  • CTRL a, CTRL a = switches between the windows
  • CTRL a, CTRL d = detaches from the session
  • screen -r = reattaches to the first session (with possible several windows)
  • CTRL a, w = list all available windows in this session or use
  • CTRL a, ” = a table like list of all windows

One thought on “Screen (Part 2)

  1. Pingback: Screen (Part 1) « Find Time for the Karussell

Comments are closed.