Warning: Division by zero in /membri/cowizard/wp-content/plugins/wordpress-seo/inc/class-wpseo-image-utils.php on line 223

How To: Create A Simple HTTP Server In Linux

To set up a temporary, very simple, HTTP server for any directory in your /home directory, follow these instructions.

Open a terminal and cd to the directory of choice.

Issue the following command:

You can then access the contents of that directory using a browser pointed at the IP address of the PC at port 8000.  as an example, from any PC on the LAN.

You can also access the directory from the same machine (not very useful) using


If the directory has a file named index.html, that file will be served as the initial file. If there is no index.html, then the files in the directory will be listed.

If you wish to change the port that’s used, then the command would be:

python -m SimpleHTTPServer 8888  (or whatever port you chose for example 8080)

I find this really simple and useful at times. Keep it in mind; you might find it equally convenient.

Photo by paulward8

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

You may also like...

Spelling error report

The following text will be sent to our editors: