Sharing files on Linux

Learn how to send and receive files securely and easily over Meshnet on Linux.
This guide provides the information you need to start sharing files over Meshnet on Linux.

Before you begin

Make sure that the device you want to share files with meets the following criteria:
  • The NordVPN app is running, and the Meshnet feature is enabled in the app.
  • The device is connected to your Meshnet.
You can add devices to your Meshnet in two ways, depending on device ownership:

Send files

You can initiate a file transfer from the NordVPN app by completing these steps:
  1. 1.
    Open the terminal.
  2. 2.
    Enter the nordvpn meshnet peer list command and copy the Nord name or Meshnet IP address of the device you want to share your files with.
  3. 3.
    Type the nordvpn fileshare send command, followed by your peer device’s Nord name or Meshnet IP address and the path to the file you want to transfer, as shown:
    nordvpn fileshare send <peer> </path/to/your/file>
    The "Waiting for the peer to accept your transfer" message is displayed in the terminal
  4. 4.
    Add more files to the transfer if needed. You can drag files from the file explorer to the terminal to paste the path. Example
    Two file paths are displayed next to the nordvpn fileshare send command in the terminal
The file transfer begins as soon as the recipient accepts your download request on their device.
To find your peer's Nord name faster, start typing the name and press Tab. The system will auto-complete the name with a match from online devices.
See how to receive shared files on a Linux device further in this article.
You can only send files to the devices that have the file sharing permission enabled for your device. For more information, see File sharing permissions.

Viewing outgoing transfer history

To display the history of transfers sent from your device, along with their ID, size, status, and other relevant details, use the following command:
nordvpn fileshare list --outgoing
The transfers in the list are arranged in chronological order, with the oldest transfers appearing first.

Receive shared files

To receive files shared from another linked device, you can use the NordVPN notifications or the command line.
Accepting transfers using notifications
Accepting transfers using the command line
  1. 1.
    Open the terminal.
  2. 2.
    Ensure that you have enabled the NordVPN notifications by running this command:
    nordvpn set notify on
  3. 3.
    Have your Meshnet peer send the files.
  4. 4.
    Upon receiving the file transfer notification, select Accept within it to start the download of the transferred files.
    Clicking 'Accept' in the NordVPN incoming file transfer notification.
  1. 1.
    Have your Meshnet peer send the files.
  2. 2.
    Open the terminal.
  3. 3.
    Enter the nordvpn fileshare list command followed by --incoming to display incoming requests, as shown:
    nordvpn fileshare list --incoming
  4. 4.
    Copy the ID of the file transfer request you want to accept.
  5. 5.
    Type nordvpn fileshare accept followed by the file transfer ID from the previous step, as shown:​
    nordvpn fileshare accept <id>
    CLI showing the "nordvpn drop accept" command followed by the file transfer ID
The ID can be auto-completed. Start typing the initial characters of the ID and press Tab for quick suggestions.
Once a download is complete, if you have NordVPN notifications enabled, you will receive a notification about each individual downloaded file.
NordVPN notification informing about a finished download.
You can find the files shared with you by checking your computer’s default download folder location, which is typically the Downloads folder.
If you want to download only specific files from the transfer, provide the names of the files you choose to accept.
nordvpn fileshare accept <id> <file1> <file2>...​
CLI showing the "nordvpn fileshare accept <id>" command with two file names highlighted
To display the list of files in a particular transfer directory, enter the nordvpn fileshare list command followed by the transfer ID:
nordvpn fileshare list <id>

Accepting transfers automatically

You can enable automatic transfer acceptance from a specific peer. To do this, run the following command, replacing <device> with the peer’s Nord name or Meshnet IP:
nordvpn meshnet peer auto-accept enable <device>
To learn more, see the Changing permissions section of the "File sharing permissions" page.

Setting the download location

If you want to specify the location on your system where downloaded files will be saved, use the --path command option followed by the desired location and the transfer ID:
nordvpn fileshare accept --path </path/to/directory> <id>

Cancel file transfers

If you need to cancel a transfer while it is still in progress, there are two ways to do it:
  • Using Ctrl + C
  • Using the cancel command

Using the cancel command

The cancel command is typically used when the transfer is running in the background or when you are canceling from a different terminal session.
To cancel a file transfer, enter the following, replacing <id> with the ID of the transfer you want to cancel.
nordvpn fileshare cancel <id>
A message confirming the successful cancellation of a file transfer
Provide a file name if you want to cancel a specific file in the transfer, as shown:
nordvpn fileshare cancel <id> <file>

Run a transfer process in the background

If you want to run a transfer process in the background, use the --background option.
  • When sending a file transfer, enter:
    nordvpn fileshare send --background <peer> </path/to/your/file>
  • When accepting a file transfer, type:
    nordvpn fileshare accept --background <id>

Display a help message

You can access command information using the --help option. For example, to view helpful information about the fileshare command, type:
nordvpn fileshare --help

See also

© 2023 Nord Security. All Rights Reserved.