Share folder and files on Lan in Ubuntu
You want to share files on the local network or transfer files from one computer to another? below, a very simple way through the console.
Made in seconds. We can share files locally, but if we have an ip output to the world also globally.
We start the terminal and go to the directory we want to share.
in my case, let it be the Music folder:
1 | cd /home/rafal/Muzyka/ |
and run the command:
1 | python3 -m http.server |
Below is a log from the console:
1 2 | Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... 127.0.0.1 - - [30/May/2022 08:41:21] "GET / HTTP/1.1" 200 - |
Now after switching to ourIP address:8000
We will list the entire directory.
If we want to change the port on which the script is to be run in the console, we issue the command:
1 | python3 -m http.server 9001 |
9001 we replace, of course, with our port.