FSIBLOG

What Is the Best File Sharer for Linux Ubuntu? LocalSend and 5 Terminal Tools for Everything Else

Best File Sharer for Linux Ubuntu: LocalSend and 5 CLI Tools

The best file sharer for most Ubuntu users is LocalSend. It sends files to Android, iPhone, Windows, Mac and other Linux machines on the same Wi-Fi. It needs no account and no internet connection, and the transfer is encrypted. For anything LocalSend can't do, there is a free terminal tool, and each one is covered below with the exact commands.

Why LocalSend Is the Best Pick for Most People

The one limit: both devices have to be on the same local network. To send to someone in another city, jump to croc and magic-wormhole below.

Install LocalSend on Ubuntu From the Terminal

Pick one of these two methods. Both are official listings from the LocalSend project.

Option A: Flatpak From Flathub

sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.localsend.localsend_app

Option B: Snap

sudo snap install localsend

Open the Port If Your Firewall Is On

sudo ufw status
sudo ufw allow 53317

Send Your First File

  1. Install LocalSend on the other device from its app store, or from localsend.org.
  2. Open LocalSend on both devices, connected to the same Wi-Fi.
  3. On Ubuntu, go to the Send tab and pick a file, folder or text.
  4. Tap the other device when it appears in the Nearby devices list.
  5. Accept on the other device. The file lands in its Downloads folder.

Five Terminal Tools for the Jobs LocalSend Can’t Do

1. Python’s Built-in Server: Share a Folder With No Install at All

Ubuntu ships with Python 3, and Python 3 can serve a folder as a simple web page. The other device only needs a browser. That makes it the quickest way to hand files to a TV, a work laptop you can’t install apps on, or a friend’s phone.

Save this as share-here.sh in your home folder:

#!/usr/bin/env bash
# share-here: serve the current folder to other devices on the same network
PORT="${1:-8000}"
IP=$(hostname -I | awk '{print $1}')
echo "Open this on the other device: http://$IP:$PORT"
echo "Press Ctrl+C to stop sharing."
python3 -m http.server "$PORT" --bind 0.0.0.0
chmod +x ~/share-here.sh
cd ~/Pictures
~/share-here.sh
Open this on the other device: http://192.168.1.42:8000
Press Ctrl+C to stop sharing.
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

2. croc or magic-wormhole: Send to Someone Over the Internet

Both tools give you a short code phrase. You read it out to the other person, they type it in, and the file goes across encrypted from end to end. Neither side needs port forwarding.

magic-wormhole is in Ubuntu’s own software repository:

sudo apt install magic-wormhole
wormhole send project.zip
Sending 4.2 MB file named 'project.zip'
Wormhole code is: 7-crossover-clockwork
wormhole receive 7-crossover-clockwork

croc does the same job and adds resume for broken transfers. Download the .deb for Linux 64-bit from the croc releases page on GitHub, then:

sudo apt install ./croc_*_Linux-64bit.deb
croc send project.zip

3. rsync Over SSH: Copy Big Folders Between Two Linux Machines

For tens of gigabytes, or a copy you’ll repeat every week, rsync is the tool. It only sends files that changed, and it picks up where it stopped if the connection drops.

sudo apt install openssh-server rsync
hostname -I
sudo apt install rsync
rsync -avP ~/Videos/ ash@192.168.1.50:~/Videos-backup/

4. Samba: A Shared Folder Windows PCs Can Open

Samba makes an Ubuntu folder show up in Windows File Explorer like any other network drive. It suits an office or a family where several Windows PCs need the same files.

sudo apt install samba
mkdir -p ~/Shared
sudo smbpasswd -a $USER

Open the Samba settings file with sudo nano /etc/samba/smb.conf and add this block at the very end. Change ash to your own user name:

[Shared]
   path = /home/ash/Shared
   read only = no
   browseable = yes
   valid users = ash
sudo systemctl restart smbd
sudo ufw allow samba

5. Syncthing: Keep Folders the Same on Every Device, Automatically

Syncthing isn’t for one-off sends. It keeps a folder identical across your Ubuntu PC, a laptop and a phone, so a file saved on one appears on the others. There’s no cloud account. The devices sync directly with each other.

sudo apt install syncthing
systemctl --user enable --now syncthing
  1. Open http://127.0.0.1:8384 in your browser. This is Syncthing’s control panel.
  2. Install Syncthing on the other device and add each device by its Device ID, found under Actions → Show ID.
  3. Choose a folder to share and tick the device to share it with.

Which Ubuntu File Sharer Fits Your Situation

ToolBest forOther device needsOver the internetEncrypted
LocalSendPhones, Windows, Mac on the same Wi-FiLocalSend appNoYes
python3 http.serverQuick one-off, any browserJust a browserNoNo
croc / magic-wormholeSomeone in another placeSame toolYesYes
rsync over SSHBig or repeated copies, Linux to LinuxSSH serverWith setupYes
SambaA shared folder for Windows PCsNothing extra on WindowsNoDepends on settings
SyncthingFolders that stay in syncSyncthing appYesYes

Fixes When the Other Device Doesn’t Show Up

Exit mobile version