Any views expressed within media held on this service are those of the contributors, should not be taken as approved or endorsed by the University, and do not necessarily reflect the views of the University in respect of any particular issue.

Use/Less

Use/Less

A virtual pinboard of use[ful/less] information

Remote terminal sessions with GNU Screen

If you need to run a long running terminal session on a remote server, you can keep the terminal session running, even if the ssh connection gets disrupted, by using the GNU Screen program.

Command tips:

  • screen –help (obvious)
  • Check (list) if you have screen session(s) already running: screen -ls
  • Reattach to an existing screen session: screen -r [session]
  • Start a new sesssion with a meaningful name: screen -S sensiblename
    Screen’s default session names are based on the process ID, so if you have multiple sessions running, you’ll probably forget which was which later on, unless you give them a more explanatory name instead.
  • Within a screen session, screen’s own commands start with <ctrl>+a (written C-a here).
  • In-program help, show key commands: C-a ?
  • Detach a screen session from the terminal (so that it can continue to run in the background): C-a d
    If your connection is disrupted, you can just ssh in again later, and then reattach an existing session, as noted above.
css.php

Report this page

To report inappropriate content on this page, please use the form below. Upon receiving your report, we will be in touch as per the Take Down Policy of the service.

Please note that personal data collected through this form is used and stored for the purposes of processing this report and communication with you.

If you are unable to report a concern about content via this form please contact the Service Owner.

Please enter an email address you wish to be contacted on. Please describe the unacceptable content in sufficient detail to allow us to locate it, and why you consider it to be unacceptable.
By submitting this report, you accept that it is accurate and that fraudulent or nuisance complaints may result in action by the University.

  Cancel