DEV Community

Cover image for Fastest way to transfer file within Ubuntu to Ubuntu or Mac to android on same network
Sahil kashyap
Sahil kashyap

Posted on • Edited on

2

Fastest way to transfer file within Ubuntu to Ubuntu or Mac to android on same network

Install

http-server
npm install --global http-server

open CMD,type in this

http-server
it returns

Starting up http-server, serving ./

http-server version: 14.1.1

http-server settings: 
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://127.0.0.1:8080
  http://192.168.0.116:8080
Hit CTRL-C to stop the server

Enter fullscreen mode Exit fullscreen mode

in other laptop open chrome,type this
http://192.168.0.116:8080

And start downloading

In Mac

Open terminal,Navigate to Downloads folder

sh cd Downloads

Type in this command

http-server ./ -p 1313

./ specifily will serve only the content in Download folder

-p is the port

Starting up http-server, serving ./

http-server version: 14.1.1

http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://127.0.0.1:1313
  http://192.168.0.108:1313
Hit CTRL-C to stop the server
Enter fullscreen mode Exit fullscreen mode

In Your android , open up chrome
Type in the url
http://192.168.0.108:1313

And select the file, it'll start downloading
in Android mobile

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay