Easy home network share

Moderator: Forum moderators

Post Reply
d-pupp
Posts: 183
Joined: Tue Nov 22, 2022 9:11 pm
Location: Canada
Has thanked: 90 times
Been thanked: 40 times

Easy home network share

Post by d-pupp »

@dimkr

But my point is, you don't need Samba to transfer files in the LAN!!! You can use python3 -m http.server 80

I tried this... It is really cool and simple
All you have to do is open the folder you want to share. Open a terminal here (on the folder you want to share) or Open a terminal and cd to the folder you want to share. And type

Code: Select all

python3 -m http.server 8080

And it starts a minimal web server. get files only no uploads.

Leave the terminal running! Once you shut the terminal or ctrl c the server stops.

Now you need your local ip address

Code: Select all

ip a

or

Code: Select all

ifconfig

will get you what you need.

Now open your browser either remotely or locally and type into the address bar the ip address a : and port number you used above. ie. 192.168.0.10:8080

That it. your browser will display anything in the folder
You can even test web pages by naming it index.html and it will open like a normal web page
P.S. Files with a .txt extension open up and display it contents if you want to download it rename it without the .txt

P.S. I am not sure if this will work in all pups. It does work in Vanilla dpup
to test type

Code: Select all

which python3

if you get a response you are good to go. :thumbup:

User avatar
fredx181
Posts: 2561
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 274 times
Been thanked: 993 times
Contact:

Re: Easy home network share

Post by fredx181 »

d-pupp wrote:

python3 -m http.server 8080

And it starts a minimal web server. get files only no uploads.

For python3 with upload, see here: viewtopic.php?p=82147#p82147

To get easily your local ip-address:
ip addr show | grep -w "inet" | grep -v "127.0.0.1" | awk '{print $2}' | cut -d "/" -f 1

Post Reply

Return to “Network/Server”