Skip to content

Instantly share code, notes, and snippets.

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 kaedea/5be6bb8be117c715fdc76e1fe4e9b411 to your computer and use it in GitHub Desktop.
Save kaedea/5be6bb8be117c715fdc76e1fe4e9b411 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment