Skip to content

Instantly share code, notes, and snippets.

@cbilgili
Last active February 28, 2018 21:11
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 cbilgili/082bf17792d4b7d148fa35c9a6c76703 to your computer and use it in GitHub Desktop.
Save cbilgili/082bf17792d4b7d148fa35c9a6c76703 to your computer and use it in GitHub Desktop.
screen ssh long running commands
You want to be using GNU Screen. It is super awesome!
ssh me@myserver.com
screen #start a screen session
run-a-long-process
CTRL+a , d to detatch from your screen session
exit #disconnect from the server, while run-a-long-process continues
When you come back to your laptop:
ssh me@myserver.com
screen -r #resume the screen session
Then check out the progress of your long-running process!
You can quit that screen without attaching to it. First, find its session and then quit it:
screen -ls
screen -X -S [session # you want to kill] quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment