projectz

Tech, Gadgets, Photography, Social Media and Poor Spelling

Question: What is the quickest way to setup a webserver on Linux?

Want to quickly share a file with someone? Set up your own web server in a few keystrokes with this handy command:

python -m SimpleHTTPServer

Just like that, your current directory will be shared. Here’s what it looks like in a web browser:

linux command line

Naturally, you’re going to need to set up your router properly if you want to share with someone outside your current network. A dedicated IP or a service like DynDNS will also be needed. Still, for local file sharing, it’s hard to beat the above command: it’s quick and easy. It worked for me on Ubuntu and OS X.

Leave a comment

Information

This entry was posted on October 30, 2011 by in regular and tagged , , , , , .