Home Command line utilities Transfer Files From Computer To Mobile Devices By Scanning QR Codes
qr-filetransfer - Transfer Files From Computer To Mobile Devices By Scanning QR Codes

Transfer Files From Computer To Mobile Devices By Scanning QR Codes

By sk

Transferring files from a Computer to a smartphone is not a big deal. You can do this by mounting the mobile phone on your system using an USB cable, then transfer files from the file manager. Also, some third party applications, such as KDE Connect and AirDroid, can help you to easily manage and transfer files from your system to Android devices. Today, I stumbled upon a super cool utility named "Qr-filetransfer". It allows you to transfer files over WiFi from computer to mobile devices by scanning QR codes without leaving your Terminal. Yes, you read that right! qr-filetransfer is a free, open source command line utility written using Go programming language. In this brief tutorial, we are going to learn to transfer files from Linux to any mobile devices using qr-transfer.

Installing Qr-filetransfer

First, install Go language on your system.

On Arch Linux and derivatives:

$ sudo pacman -S go

On RPM based systems like RHEL, CentOS, Fedora, run:

$ sudo yum install golang


$ sudo dnf install golang

On DEB based systems such as Debian, Ubuntu, Linux Mint, you can install it using command:

$ sudo apt-get install golang


$ sudo zypper install golang

After installing Go language, run the following command to download qr-filetransfer application.

$ go get github.com/claudiodangelis/qr-filetransfer

The above command will download the contents of a qr-filetrnasfer GitHub repository in a directory named "go" in your current working directory.

Copy the qt-filetransfer binary file to your PATH, for example /usr/local/bin/.

$ sudo cp go/bin/qr-filetransfer /usr/local/bin/

Finally, make it executable as shown below.

$ sudo chmod +x /usr/local/bin/qr-filetransfer

Transfer Files From Computer To Mobile Devices By Scanning QR Codes

Make sure that your smartphone is connected to the same WiFi network as your computer.

Then, launch qt-filetransfer tool along the with the file or folder path you want to transfer to your smartphone.

For example, I am going to transfer a mp3 file.

$ qr-filetransfer Chill\ Study\ Beats.mp3

At first launch, qr-filetransfer will ask you to choose the network interface to use like below.

Choose the network interface to use (type the number):
[0] enp5s0
[1] wlp9s0

I am going to transfer file using wlp9s0 interface, hence I typed "1". Qr-filetransfer will remember this choice and you will never be prompted again, unless you pass the -force argument, or delete the .qr-filetransfer.json file that the program stores in the home directory of current user.

Then, you will see the QR code as shown in the below picture.

Open the QR code app (if it is not installed already, install any QR code reader app from play store) and scan the QR code displayed in your terminal.

Once the QR code is read, you will be asked whether you want to copy the link or open the link. You can either copy the link and paste it manually on your mobile web browser or choose "Open link" to automatically open it in your mobile browser.

Once the share link has been opened, the file will be downloaded in your smartphone.

If the file is too big, zip the file, then transfer it

$ qr-filetransfer -zip /path/to/file.txt

To transfer a full directory, run:

$ qr-filetransfer /path/to/directory

Please note that the directory gets zipped before being transferred.

Qr-filetransfer utility will only transfer the stuffs from your system to mobile and not vice versa. This project is very new, so there will be bugs. If you encountered any bugs, report them in the GitHub page given at the end of this guide.



Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like


truth March 26, 2018 - 8:42 pm

seriously? why?

Liby Tards March 27, 2018 - 12:29 am

qr code are so yesterday!

sundaram yadav March 17, 2019 - 6:52 pm

can we copy a file from windows laptop to phone ?

sk March 17, 2019 - 7:57 pm

Haven’ tested on Windows. Check it out and see if it works.


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More