Skip to content
86% off$349 $48.86code BF2026

Guides

How to share files between Mac and Linux: 6 ways

Share files between Mac and Linux with scp, rsync or SMB, or skip the setup with a transfer app, a browser link or Bluetooth. Commands and fixes included.

GuideUpdated 11 min read

On this page

The quickest way to share files between a Mac and Linux is scp over SSH. Turn on the SSH server on the Linux machine, then run scp file.pdf user@192.168.1.50:~/ in Terminal on the Mac. macOS already includes scp, and most Linux distributions can install the SSH server with one command.

For folders you copy again and again, use rsync. To work on the same files from both machines, share a folder from the Mac over SMB. If you'd rather not use Terminal or server settings, there are three more options: a transfer app on both machines, a browser link, or Bluetooth when there's no shared network.

Which way to share files between Mac and Linux

MethodBest forWhat you set upFoldersMain catch
scpOne-off copiesAn SSH server on one machine (openssh-server on Linux, or Remote Login on the Mac)Yes, with -rYou type addresses and paths
rsyncRecurring syncs, large foldersAn SSH server on one machine, rsync on bothYes, sends only what changedTrailing slashes matter; --delete removes files
SMB File SharingWorking on the same files from both machinesFile Sharing on the MacYesAccount and password settings
Transfer app on both sidesOne-off sends without TerminalLocalSend on both, or Ferryfox on the Mac with the free app on LinuxFerryfox sends foldersA Linux firewall can block discovery
Browser linkOne-off, nothing installed on LinuxFerryfox on the Mac, or Python's built-in web server on LinuxDownloads as a ZIP; uploads are files onlyPlain HTTP, not encrypted
BluetoothSmall files with no shared networkPair the machines; Ferryfox to send from the MacNoSlow: about 150 KB/s by Ferryfox's estimate

Everything except Bluetooth needs both machines on the same local network. None of these methods use a cloud account.

Over SSH: scp and rsync

One machine runs the SSH server and the other connects to it. Once the server is on, you can push and pull files from the connecting side.

Find each machine's IP address

On the Mac, run this in Terminal. It prints the address of the main network interface (en0). If it prints nothing, try en1:

bash
ipconfig getifaddr en0

On Linux, this lists the IPv4 address of each network interface:

bash
ip -4 addr show

Look for an address like 192.168.x.x or 10.x.x.x. The examples below use 192.168.1.50 for the Linux machine and 192.168.1.20 for the Mac.

Turn on SSH on the Linux machine

On Ubuntu and Debian, this installs the SSH server, which starts automatically:

bash
sudo apt install openssh-server

To undo it, remove the server again: sudo apt remove openssh-server.

On Fedora, install the server and start it now and at every boot:

bash
sudo dnf install openssh-server
sudo systemctl enable --now sshd

To undo it: sudo systemctl disable --now sshd.

Or turn on SSH on the Mac instead

  1. Open System Settings and search for "Remote Login".
  2. Turn on Remote Login.
  3. Note your Mac's short user name. Run whoami in Terminal if you're not sure.

To undo it, turn Remote Login off. With the Mac as the server, you run the scp and rsync commands below from Linux, using the Mac's user name and address.

Copy files with scp

From the Mac, send a file to your home folder on Linux:

bash
scp report.pdf alex@192.168.1.50:~/

Pull a file from Linux to the Mac's Desktop:

bash
scp alex@192.168.1.50:~/notes.txt ~/Desktop/

Copy a whole folder with -r (recursive):

bash
scp -r ~/Photos/Trip alex@192.168.1.50:~/Pictures/

alex is the user name on the machine you're connecting to. On the first connection, SSH asks you to confirm the other machine's fingerprint. Type yes, then the password.

Sync folders with rsync

rsync compares both sides and only sends files that changed, so it beats scp for folders you copy more than once. It must be installed on both machines. Most Linux distributions include it; on Debian or Ubuntu, add it with sudo apt install rsync.

This copies the contents of Projects on the Mac into Projects on Linux:

bash
rsync -av ~/Projects/ alex@192.168.1.50:~/Projects/
  • -a keeps the folder structure, permissions and modification dates.
  • -v lists each file as it's copied.
  • The trailing slash on the source (Projects/) means "the contents of this folder". Without it, you get Projects/Projects on the other side.

Run the same command later and only new or changed files move.

To preview what would happen without copying anything, add -n (dry run):

bash
rsync -avn ~/Projects/ alex@192.168.1.50:~/Projects/

Destructive: --delete removes files on the destination that no longer exist on the source. Run it with -n first and read the list.

bash
rsync -av --delete ~/Projects/ alex@192.168.1.50:~/Projects/

The rsync built into macOS differs from the version on most Linux distributions. The options above work with it. If you need newer options, install a current rsync with Homebrew (brew install rsync).

If scp says "Operation not permitted"

macOS protects folders such as Desktop and Documents from remote SSH sessions. Copy to or from your home folder instead. If you really need those folders, open the Remote Login details in System Settings and allow full disk access for remote users. Turn it off again when you're done.

What SSH can't do

There's no discovery: you type addresses and paths, and when an IP address changes, your commands change too. One side always needs a running SSH server.

SMB File Sharing from the Mac

SMB lets Linux open a Mac folder like a network drive. Use it when you work on the same files from both machines instead of copying them back and forth.

Share a folder on the Mac

  1. Open System Settings and search for "File Sharing".
  2. Turn on File Sharing.
  3. Click the info button next to it and add the folders you want to share with the add (+) button.
  4. In the same window, open the options. Keep SMB sharing on and turn on your user account under Windows File Sharing. macOS asks for your password; this lets other computers sign in with your Mac account.
  5. Note the smb:// address shown in the File Sharing details.

To stop sharing, turn File Sharing off.

Connect from Linux

In GNOME Files, press Ctrl+L and type the address. In KDE's Dolphin, type it in the location bar:

text
smb://192.168.1.20/

Sign in with your Mac user name and password, then pick the shared folder.

To mount the share from the command line, install cifs-utils (sudo apt install cifs-utils on Debian or Ubuntu), create a mount point and mount it. Shared is the name of the folder you shared on the Mac:

bash
sudo mkdir -p /mnt/mac
sudo mount -t cifs //192.168.1.20/Shared /mnt/mac -o username=alex,uid=$(id -u),gid=$(id -g)

The uid and gid options make the files writable by your Linux user. To disconnect: sudo umount /mnt/mac.

The other direction

If the Linux machine already shares a folder with Samba, connect from the Mac in Finder with Go ▸ Connect to Server (⌘K, Command-K) and enter smb://192.168.1.50/sharename.

A transfer app on both sides

A transfer app finds devices on the local network by itself. You pick a device by name: no addresses, no server settings, no accounts.

Free: LocalSend on both machines

LocalSend is free and open source (Apache-2.0, as of November 2026), with apps for macOS, Linux and other platforms. Install it and open it on both machines, and each should list the other. It sends files and text, can require a PIN before receiving, and checks files with SHA-256 checksums. It also has share and receive links and a command-line tool.

For occasional transfers between one Mac and one Linux machine, this is enough.

On the Mac: Ferryfox with the free app on Linux

We make Ferryfox, a Mac menu bar app for moving files between a Mac and nearby devices, so weigh this part accordingly. On Linux you still use a free app. Ferryfox's setup guide (Help ▸ Set Up Another Device…, Windows & Linux tab) links to its download page and tells you to "Open it on the same network and this Mac appears."

What Ferryfox does differently on the Mac side:

  • You can drop files on the ferry icon in the menu bar, or send from Finder: Send with Ferryfox in Quick Actions or the Services menu, or Ferryfox in the Share menu.
  • It has Shortcuts actions (Send Files to Device, Send Text to Device).
  • Browser links and Bluetooth sending are in the same app (sections below).
  • A Transfer History window records local-network transfers.

To send from the Mac to Linux:

  1. Open the free app on the Linux machine, on the same network as the Mac.
  2. In Ferryfox, wait for the Linux machine to appear as a card on the device board.
  3. Drag files or folders onto the card, or select the card and press Return to pick files.
  4. Accept on the Linux side.

To send from Linux to the Mac, pick the Mac in the free app. Other devices see the Mac under a random "Adjective Animal" name, not its computer name; the board's footer shows it as "This Mac is…". An Accept panel appears on the Mac: press Return to accept. Requests decline themselves after 60 seconds. Files go to ~/Downloads/Ferryfox unless you chose another folder.

Before you rely on it:

  • When Ferryfox sends to another app, empty folders are dropped and symbolic links skipped. Otherwise the folder structure is kept.
  • If the Linux app requires a PIN to receive, Ferryfox can't send to it, because there's no PIN entry when sending. The send fails with "PIN required or wrong PIN". Turn the PIN off on Linux, or send from Linux instead.
  • Don't run Ferryfox and another transfer app that uses the same protocol on the Mac at once. Both want port 53317, and Ferryfox reports "Another app is using port 53317. Quit other file-transfer apps, then restart Ferryfox."

Ferryfox is part of MacSuite; you can try it free for 7 days.

When you can't install anything on the Linux machine, its browser is enough.

With Ferryfox

  • Mac to Linux: in Ferryfox, choose File ▸ Share via Link… (⌘L, Command-L) and add files, or drop them on the sheet. Open the link it shows in the Linux browser. The page lists each file, and Download All gets a ZIP when there are two or more.
  • Linux to Mac: choose File ▸ Receive via Link… (⇧⌘L, Shift-Command-L) and open the link on Linux. Choose files or drop them on the page (dropped folders are ignored). By default the Mac asks you to accept each upload.
Ferryfox's Share via Link sheet with QR code, link, download counts and two devices under Opened By
Any phone or PC on the same Wi-Fi can download the files in a browser.

The Options menu in each sheet sets when the link expires (After One Download or After One Upload, After 10 Minutes, which is the default, or When Closed) and can require a 6-digit PIN. When sharing, you can also approve each device that opens the link. Closing the sheet ends the link.

The link uses plain HTTP, so the traffic is not encrypted. It works only on the same network over IPv4 and is never reachable from the internet. Turn on Require PIN on shared Wi-Fi. More in Share and receive with a browser link.

Free: Python's web server on Linux

Most Linux distributions include Python 3. This serves the current folder as a read-only download page on port 8000:

bash
cd ~/Shared
python3 -m http.server 8000

Open http://192.168.1.50:8000 in Safari on the Mac and click files to download them. Press Ctrl+C on Linux to stop. While it runs, anyone on the network can browse that folder, nothing is encrypted, and it only works for Linux-to-Mac downloads. If the Linux firewall is on, open port 8000 (see the firewall section below).

Over Bluetooth

Bluetooth is the only option here that works without a shared network. It's slow: Ferryfox's estimate is based on about 150 KB/s, so a 50 MB file takes roughly 5 to 6 minutes. Use it for documents, not videos.

Mac to Linux with Ferryfox

  1. Pair the Linux machine with the Mac in macOS Bluetooth settings.
  2. Make sure the Linux machine accepts Bluetooth file transfers (OBEX Object Push). Depending on the desktop, this is in its Bluetooth or Sharing settings, or provided by BlueZ's obexd service.
  3. In Ferryfox, choose File ▸ Send via Bluetooth… (⇧⌘B, Shift-Command-B) and pick files. Folders are skipped.
  4. Select the Linux machine in the list and click Send.
  5. Accept on Linux within 180 seconds.

The first time, macOS asks for Bluetooth permission. Above 50 MB, Ferryfox suggests a browser link instead.

Linux to the Mac

Ferryfox doesn't receive over Bluetooth; macOS does it with Bluetooth Sharing. Open System Settings, search for "Bluetooth Sharing" and turn it on, then send from the Linux machine's Bluetooth settings. See How to send files over Bluetooth on a Mac for details.

Fix discovery: open the Linux firewall

When the Mac and the Linux machine can't find each other in a transfer app, the Linux firewall is the usual cause. By default these apps use port 53317: TCP for transfers and UDP multicast (group 224.0.0.167) for discovery. Allow both. If you changed the port in either app, open that port instead.

Open the ports

On Ubuntu with ufw (check whether it's active with sudo ufw status):

bash
sudo ufw allow 53317/tcp
sudo ufw allow 53317/udp

To undo: sudo ufw delete allow 53317/tcp and sudo ufw delete allow 53317/udp.

On Fedora and other firewalld systems:

bash
sudo firewall-cmd --permanent --add-port=53317/tcp
sudo firewall-cmd --permanent --add-port=53317/udp
sudo firewall-cmd --reload

To undo, run the same commands with --remove-port instead of --add-port, then reload.

For SSH, allow the service: sudo ufw allow ssh, or sudo firewall-cmd --permanent --add-service=ssh followed by sudo firewall-cmd --reload. For the Python web server, allow port 8000 the same way (sudo ufw allow 8000/tcp) and remove the rule when you're done.

If the devices still don't appear

  • Multicast is blocked on the network. Ferryfox falls back to scanning the local subnet. If that fails too, choose File ▸ Add by IP… (⌘K) and enter the Linux machine's address. Leave Add to Favourites on and Ferryfox checks that address directly from then on.
  • Guest or hotel Wi-Fi. These networks often stop devices from seeing each other. Use a home network, a wired connection, or Bluetooth.
  • A VPN is on. VPNs can hide devices on your local network. Disconnect it on either machine and try again.
  • The Mac blocks Ferryfox. In Ferryfox, choose Help ▸ Can't See a Device…. It checks Local Network access, the firewall, VPNs, the network type and the receiving port, and offers a button to open the right setting where one applies. See Can't see a device? Troubleshooting.
  • The Mac is hidden. If Ferryfox's Visible to setting is Trusted Devices or Hidden, the Linux app won't see the Mac. Click the visibility pill in the footer and choose Visible to Everyone for 10 Minutes, or set Visible to back to Everyone in Settings ▸ Devices.

FAQ

Can I AirDrop to a Linux computer?

No. Linux has no AirDrop support. A transfer app on both machines comes closest: you pick the device by name and accept on the other side.

What about a USB drive?

Format it as exFAT and both macOS and current Linux distributions can read and write it. It's a sensible choice for very large one-off copies when the network is slow or unavailable.

Which method is fastest?

On the same network, the connection matters more than the method: wired Ethernet on both sides is usually faster than Wi-Fi. Bluetooth is far slower than everything else. For repeat copies of a large folder, rsync saves the most time because it skips unchanged files.

For other devices and directions, see How to transfer files to and from a Mac and How to transfer files between Mac and Windows PC. For more app options, see Best file transfer apps for Mac.

Every app.
One purchase.