How to Linux quick, easy, file sharing server with one command

Don’t install a server, just issue one command!

So, you want to share a file with a friend. It could be a document, a song, a directory of photos, anything.

Do you want to install and set up a server? NO!

Do you want to go to a directory and issue one command? YES!

Open your terminal and cd to the directory where you want to share the file(s) from:

cd /home/rich/shared

Now start the Python Simple HTTP Server:

python -m SimpleHTTPServer

That’s it! Open your browser and go to this url:

http://localhost:8000 or http://127.0.0.1:8000

Now you will see the files that you want to share. All you need to do is send a message to your friend with your IP address and port :8000 and he/she can download anything from your /shared directory.

You can get your external IP address by going to:

http://www.whatsmyip.org/

Once you have finished, go back to your terminal and hit Ctrl+C and the server will stop.

Advertisements

3 thoughts on “How to Linux quick, easy, file sharing server with one command

  1. Yeah, having a hosted wordpress blog takes some getting used to as I can't install all the plugins I had at LxH. But there ya go, that's the price of free hosting 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s