Consider this, you want to share files between two system or you want to send really large file to your friend or you want to share new season of 'The big bang theory' among your peers.
What if you do not have pen drive with you. What if file size is larger than pen drive capacity? What if you have some file which is required by 100 people?
Python Simple HTTP server comes to the rescue. Using a one line command in your terminal you can overcome all limitations discussed above.
python -m SimpleHTTPServer
This will start the HTTP server on default port i.e. 8000. To start the server on some other port, provide the port number with command.
python -m SimpleHTTPServer 8080
This will now list the files and directories in current folder. Go to
http://<your_ip_address>:8000 and you will see the list.
/home/picture/directory. Go to
/home/picture/folder and start the server there using above command.
If you have index.html file in your folder then that file will be served as webpage else files and directories will be listed.
You can access the files on another system by opening the
http://<your_ip_address>:8000 url in browser.
Important: Both the systems should be on same network.
python3 -m http.server.