Skip to content

Instantly share code, notes, and snippets.

@pwittchen
Created September 23, 2015 10:42
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save pwittchen/531c0bed8a20c1f06231 to your computer and use it in GitHub Desktop.
Save pwittchen/531c0bed8a20c1f06231 to your computer and use it in GitHub Desktop.
Starting and stopping simple HTTP server in background on Linux. After starting server and closing terminal, server should keep running
# starting simple HTTP server with Python in background
screen -d -m python -m SimpleHTTPServer 7777
# killing process running with screen in background
kill -9 `top -n 1 | pgrep screen`
@l50
Copy link

l50 commented Jun 13, 2019

Very nice, thanks for sharing!

@wadel86
Copy link

wadel86 commented Jan 26, 2021

Thanks 👍

@ICHx
Copy link

ICHx commented Mar 23, 2021

great, I couldn't run the server when I quite shell

Now I can

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