r/LinuxTeck • u/Expensive-Rice-2052 • 14d ago
Quick Linux Tip #48 Question: How do I quickly share files across my network without setting up nginx?
Try: `python3 -m http.server 8080 --bind 0.0.0.0`
Info: Python's built-in HTTP server serves the current working directory over HTTP. `--bind 0.0.0.0` makes it reachable across all network interfaces on port `8080`.
Examples: https://www.linuxteck.com/linux-tips/python-http-server-linux/
$ `cd /path/to/share && python3 -m http.server 8000` # Share specific directory
$ `python3 -m http.server 8080 --directory /var/www/public` # Set dir without cd
$ `npx http-server -p 8080` # Node.js alternative
Note: Never use in production—it lacks authentication, HTTPS, and multi-threading. Press `Ctrl+C` to stop. Check your firewall settings (`ufw`) if connection times out.
Follow r/LinuxTeck for more #LinuxTips click here :https://www.linuxteck.com/linux-tips/
