Copy Files from Linux to macOS Desktop

3 minute read Published

Easily move files machine-to-machine using Deepin 20 and Midnight Commander.

If you need to copy files from a Linux computer to macOS desktop, this short tutorial will explain how using Arch Linux with Deepin 20 and Midnight Commander. Rather than using a Wi-Fi gateway such as a a router, we’ll connect Arch directly to macOS using the Personal Hotspot in Deepin 20 giving us an M2M connection.

If you don't have Deepin installed, you can still follow along. But you'll need to network the two machines some other way. If you run Arch you can install DDE on your machine using Pacman with sudo pacman -S deepin.

This guide will assume you’re running Deepin.

Download Midnight Commander

Midnight Commander is a File Browser that works over SSH. It works entirely in the terminal and is perfect for transferring files using an SSH connection. Download it on your Linux machine. Download & install with sudo pacman -S mc.

You won’t need anything else to transfer files. And Midnight Commander supports a mouse so it’s very user friendly. Best of all it doesn’t require a GUI.

Start Personal Hotspot

Access Control Center > Network from Deepin Desktop and enable Personal Hotspot.

Click the + button to create a new hostpot. Set WPA/WPA2 Personal for Security, enter a password and fill in the SSID or hotspot name and Save your changes.

Once the hotspot is created toggle the Hotspot switch to activate it. This will disconnect you from Wi-Fi and start broadcasting the hotspot SSID.

dde control center

Connect to the hotspot from your Mac.

Enable Remote Login on macOS

Once connected to your hotspot enable Remote Login on macOS. To do so open System Preferences > Sharing and check the box next to Remote Login as shown here:

macos remote login

Notice the SSH connection instructions:

To log in to this computer remotely, type "ssh user@host"

Instead of host you want to use the IP address of the computer on the ad-hoc network. To get it hold option and click the Wi-Fi icon in the top bar. Under Preferred Networks in the dropdown you’ll see the IP address assigned ot the machine. Substitute the IP for the host when connecting, e.g.

To log in to this computer remotely, type "ssh user@10.42.0.28"

Try connecting now from Terminal on your Linux box. Type yes when prompted to trust the host. And enter your Mac account password to finish connecting.

ssh connected

Once you’ve verified you can connect, exit the SSH connection.

Copy Files with Midnight Commander

Run mc to start Midnight Commander on your Linux machine. You should see something that looks like this:

midnight commander

Click around on the screen. Notice you can use both the keyboard or the mouse in Midnight Commander. It’s very user friendly.

Notice the window is split into two; there’s a Left and a Right. Select one of the two from the top menu and choose Shell link… from the resulting dropdown.

Then enter sh://user@10.42.0.28 into the connection dialog and press Enter. You’ll be prompted for a password just as when you connected before using ssh.

Note: Be sure you use your Mac’s IP address as explained earlier.

Now you should be looking at files on both file systems:

midnight commander

And you can move files back and forth at will. Your will. When you’re finished don’t forget to disable Remote Login on your Mac.

Advertisement
Ledger Nano X - The secure hardware wallet