Skip to content

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...

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.