The best way to Switch Recordsdata Between Linux, Android, and iOS Utilizing qrcp

File sharing apps make it easy to transfer files between mobile devices and computers. While these apps generally work well, their limitations tend to cause compatibility issues with certain platforms.

This is where qrcp comes in. Qrcp is a file transfer utility that works through the terminal and relies on Wi-Fi for file transfer. Therefore, you can use it to exchange files between any computer and mobile phone, regardless of their operating system.

Here is a guide that describes qrcp and the steps to use to transfer files between your Linux computer and a mobile device.

What is qrcp?

Qrcp is a command line tool that allows you to transfer files over WiFi using a QR code. It is compatible with all major Linux distributions and mobile operating systems (Android and iOS), so you can use it to transfer files between your computer and mobile phone and vice versa without encountering compatibility issues.

How does qrcp work?

Qrcp works exclusively through the terminal. To do this, it first connects a web server to one of the ports on your WLAN interface and creates a handle for it, which then works depending on whether the device is sending or receiving files.

As the sender, qrcp uses the handler to generate a QR code that encodes your device's IP address, port number and send instructions. The recipient then has to scan this QR code to access the download page.

If, on the other hand, the computer wants to receive files from a mobile device, the handler generates a QR code that is encoded with an IP address, port number and receiving instructions. The sender needs to scan the QR code on their mobile device to access qrcp's file sharing service, where they can select the files they want to transfer.

How to install qrcp on Linux

Installing qrcp on Linux is pretty straightforward, and you can do it in any Linux distribution. Visit the qrcp release website and download the latest TAR.GZ archive to your computer.

Download: qrcp

Then open the Terminal and navigate to the directory where you downloaded the file. Run the following command to extract the archive:

tar -xf qrcp – *. tar.gz

Copy the extracted binary file to / usr / local / bin:

sudo mv qrcp / usr / local / bin

Finally, set the execution authorization for qrcp with:

sudo chmod + x / usr / local / bin / qrcp

When you're done, do the following:

qrcp version

If a version number is returned, qrcp has been successfully installed on your Linux computer and you can use it. If not, you may have to go through the steps again.

Related: How to Compress and Unzip, or Extract TAR and TAR.GZ Files

How to use qrcp to transfer files

As we described in the working section above, qrcp can do both: send and receive files. Depending on the operation you want to perform, you need to follow the steps accordingly.

Sending files with qrcp

When we talk about sending files with qrcp, it means that files are being sent from your Linux computer to a mobile device. So in case you want to share files from your computer to your mobile phone or tablet, you can do it with the following steps:

First, connect to a Wi-Fi network. Then open Terminal and run the following command:

qrcp_name_of_file

For example:

qrcp TextFile.txt

If you want to share multiple files, you can either create a zip file yourself or let qrcp do it for you. For the latter, all you have to do is enter the command in the following syntax:

qrcp filename_1 filename_2

For example:

qrcp TextFile1.txt TextFile2.txt

On the other hand, to generate the archive yourself, do the following:

qrcp –zip file_name_with_extension

You can zip a single file using the command syntax above.

In addition, qrcp also lets you share an entire folder, which can be handy when you want to share multiple files. To do this, simply replace the file name with the folder name in your command.

For example, if you have a folder named. want to transfer documents, you need to run:

qrcp documents

As soon as you run the qrcp command – for file or folder transfer – the program generates a QR code.

Open the QR scanner on your smartphone. On Android you can use Google Lens (or any other app), while on iPhone you have the functionality built into the camera app.

Point the scanner app at the QR code on your terminal. Depending on which phone and app you are using, you will see an option to open the link in the QR code. Tap on it to visit this link and click Download/Save on computer to download the file to your device.

Related: How to Scan a QR Code on Android and iPhone

Ideally, qrcp terminates the server as soon as the receiving device downloads the files. However, you can keep them if you need to transfer the same file to multiple devices.

To do this, change your command with the –stay alive Flag as shown in the command below

qrcp –keep-alive file_or_document_name

Receiving files with qrcp

Receiving files with qrcp basically means downloading files sent from a mobile device to your Linux machine. So, if you need to share files from your smartphone to your computer, you can do it with the help of the following steps:

First, make sure that both devices are connected to the same network.

Next, open the Terminal and run the following command to generate a QR code:

qrcp received

Go to your mobile device and scan this QR code. When the link opens, you will be presented with the qrcp file sharing web app. Here tap that Choose files and use the file browser to select files (or folders) that you want to share.

Blow Transfer to send the files / folders. By default, qrcp saves the files it receives on your system's desktop. However, you can change the location by specifying your preferred directory when generating the QR code.

To do this, use the following command in the terminal window:

qrcp received –output = / preferred / destination / directory

For example:

qrcp received –output = / home / Documents

Although qrcp works fine with the default configuration settings, there are times when you want to change values ​​for options such as port, network interface, or URL scheme to suit your needs. In such cases, you can go to qrcp's GitHub page to refer to their configuration guide.

Successful file transfer with qrcp

If you prefer to work through the terminal, qrcp is the perfect tool in your arsenal for all of your file transfer needs. With it, you can transfer files in no time. Even that without leaving the terminal or downloading an app on your devices.

In this qrcp guide, you should cover pretty much all of the main fronts. However, if you want to explore more features, such as: For example, if you are transferring files over HTTPS, you can visit the GitHub page.

In case you're unfamiliar with interacting with a terminal, you can try Snapdrop, a web-based file transfer service.

How to transfer files between Linux, Android, and iOS using Snapdrop

Do you want to share files between Linux, Android and iOS without installing an app? Check out Snapdrop, a web-based file transfer service.

Continue reading

About the author

Yash Wate
(27 published articles)

Yash is Staff Writer at MUO for DIY, Linux, programming and security. Before he discovered his passion for writing, he developed for the web and iOS. You can also find his writing on TechPP where he covers other industries. In addition to technology, he likes to talk about astronomy, Formula 1 and clocks.

More
By Yash Wate

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!

Click here to subscribe

Leave a Reply

Your email address will not be published. Required fields are marked *