Turning your Linux box into a web server with just one command…

Using Linux is amazing. It is really powerful. There is almost nothing that you cannot tweak using just a few commands. From running a whole O.S. from an USB stick to carrying your hard disk with the O.S. installed on it and making it run on any (compatible) hardware piece that you may find.

In this case, I think that this is a perfect example of a basic use of simple, easy-to-use, embedded commands that you have available under your terminal window that makes your machine a powerful, incredible resource in just three steps.

I found this article on how to turn your Linux box into a web server using one simple command: python.I’m not an expert on this language but you do not really need to know too much about it to make it run. Just copy and paste, in this case. Thanks to the guy who shared the information with us. Awesome job, sir…

Systerminal.com (Spanish).

Systerminal.com (Automated Google translation).

Summarizing: there are lots of modules for this language, so we can just benefit of them and use them right there, typing a few letters on your keyboard. What you have to do is to open a terminal window on the folder you want to share. Write:

[If you have python 2 installed]

python -m SimpleHTTPServer 8000

[If you have python 3]

python -m http.server 8000

Open your web browser. In the URL box, write your machine’s IP followed by :8000 and… there you are. Your folder is available for viewing. And you are not actually sharing the “folder”. Just the contents.

Of course you can tweak the port number or other minor features. Please read the full article to know more.

Simply amazing…

This post was originally posted at:

  • Facebook
  • Twitter
  • Live
  • RSS
  • email
  • PDF

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.