Sunday, February 22, 2015

Creating a simple file server in Linux



This simple and easy. What you need to do is type one or two commands in the linux terminal. That’s it.
First cteate a directory that u want make as the file server file system,

>mkdir filename

Then include file you want to host.
Or go to the file you want host as the server,

>cd /file location/

Then start the server using below command.

>python –m SimpleHTTPServer

Now server will start with 8000 port and you local ip. Browse the server using ip and port,

<your ip>:port  

Now server will show you all hosted files in the server.
If you want to change the port of server, just start server like below,

>python –m SimpleHTTPServer 5000
5000 is the new port you wanted. You can change the number.

No comments:

Post a Comment