This brief tutorial describes how to setup a basic file server in minutes using simpleHTTPserver in Linux. This steps should work on any operating systems that supports python.
Install Python
You know how to install Python. It is available in the default repositories of almost all modern Linux operating systems.
On Arch Linux and its derivatives:
On Debian/Ubuntu and its derivatives, run the following command from the Terminal:
On RHEL/CentOS:
For Fedora:
On SUSE/openSUSE:
After installing Python, you need to do one more thing. Just run the following command from your Terminal to start the file server:
For python 3.0 and above versions, run:
Sample output would be:
To stop the file server, just press CTRL+C.
To find Python version, run the following command:
Sample output:
That’s it. File server is ready. Open the web browser and point it to http://IP-Address:8000
In case the port 8000 is blocked in your firewall, you have to open it.
For example, on RHEL/CentOS/Fedora, open port 8000 as shown below.
On Debian, Ubuntu you can allow the port as shown below.
Here it is how my local server’s contents looks in my browser.
Now, anyone in your local network can access your File server and it’s contents. Just set the permissions to your files and folders of your choice. You can then browse the contents from any local or remote systems as the way you do in any file server or website.
No comments:
Post a Comment