Sometimes, you need to share some files or directories from your Linux machine in a fast and easy way.
There is no simpler way than …
Simple HTTP Server – a module that comes with Python (>= 2.4). In most cases you don’t need to install or configure anything!
It creates a Simple HTTP Server, that turns the current directory into your web server directory, that gives you an opportunity to share files from it over HTTP.
# For Python >=2.4 python -m SimpleHTTPServer # For Python 3.x python -m http.server
Now you can access the shared folder by visiting
Simple HTTP Server will listen to 0.0.0.0:8000, but port number can be changed:
# For Python >=2.4 python -m SimpleHTTPServer 8888 # For Python 3.x python -m http.server 8888
0.0.0.0 – means that the server is not bound to a specific address, and will listen on all configured network interfaces.