Run python in terminal and don't terminate when terminal is closed
Use the nohup
shell builtin:
nohup python -m http.server 55550
To terminate the process, simply kill it using the kill
command, just like any other process.
you can also launch it in background
python -m http.server 55550 &
then enter
disown
to detach the process to the current term
screen
python -m SimpleHTTPServer 55550 &
press ctrl+a, then press d
exit
shutdown your computer
...
start your computer
ssh your server
screen -r