Ubuntu: is python -m SimpleHTTPServer a security risk, and if it is how do I turn it off [closed]


So my noob self turned on python -m SimpleHTTPServer, not thinking about how to turn it off, is there any way to kill it?


It's not really possible to assess risk without taking into account other factors such as what user you ran it as, any firewall(s) you may be using, and your network configuration (such as routers and port forwarding).

In any case, you can kill it the same way you would kill any other process e.g.

pkill -f SimpleHTTPServer  

(you should see something like

[1]+  Terminated              python -m SimpleHTTPServer  

by way of confirmation).


You can check if the HTTP server process is running by opening up terminal then typing

ps aux | grep HTTP

and see if it is there.

If the process is running, type

kill -9 PID

with PID being the process identifier of the HTTP server.

Alternatively, you could reboot your OS and then the process should not be running.


If you are sitting behind a NAT (you are using a simple router in home), if there are any firewall on your router or PC you are safe.

To stop this command after running it you can use Ctrl+C like all other commands.

If you ran it in the background so as others suggest it you should find the process and kill it:

$ pgrep -a python  14332 python -m SimpleHTTPServer  


$ kill -2 14332  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »