Transferring files between computers is relatively straightforward when you have the right tool. While most file transfer tools work the same and have a similar range of functions, some have their own distinctive features.
Croc is one such tool. It works from the command line and allows files and folders to be transferred quickly and securely between computers.
Follow Croc's discussion and list the instructions to transfer files between Linux and any other device.
What is crocodile?
Croc is a cross-platform file transfer tool that allows you to quickly and securely share files and folders between two computers. It works from the command line and is compatible with all major computing platforms: Linux, macOS, and Windows.
One aspect of Croc that sets it apart from other file sharing tools is the way it handles data transfers. For starters, croc uses a relay server – rather than uploading files to a server, unlike other tools – to create a full-duplex communication layer between the two computers for data transfer. As a result, it's much faster and doesn't require port forwarding to transfer files.
Similarly, croc uses the PAKE (Password Authenticated Key Exchange) cryptography method to ensure that your transferred data remains secure, which you normally cannot find with other file transfer utilities.
Why should you use crocodile?
Below are some of Croc's great features that set it apart from other cross-platform file sharing tools:
Croc uses a relay server to transfer data that works by creating a full duplex communication layer that allows content to be uploaded and downloaded on both computers at the same time, which in turn improves transfer rates.
Building on the previous point, another added benefit of using a relay server is that you don't need to set up port forwarding on the network to transfer data with Croc over LAN or over the Internet.
Croc uses PAKE, which offers end-to-end encryption, to ensure that all of your data transfers are secure over the network.
If the transfer is interrupted halfway – possibly due to a bad connection – the tool allows you to resume the transfer so you don't have to go through the process again.
With Croc, you can use a proxy like Tor to add an extra layer of security to your computer while files are being transferred.
You can also host the relay server yourself using Docker or other similar services.
How do I install Croc on Linux?
Croc works on all major Linux distributions, and you can install it on your computer using the steps below.
First, download the latest version of croc for your system from the link below.
To install the DEB package on Ubuntu / Debian, first start the terminal. Then navigate to the directory where you downloaded the file and enter the following command:
sudo dpkg -i croc – *. deb
Alternatively, if you're using Arch Linux, you can install Croc by running:
sudo pacman -S crocodile
To install it on FreeBSD similarly use:
pkg install croc
If you cannot find an installer for your distribution, enter the following command to download and run the installation script:
Curls https://getcroc.schollz.com | bash
Since croc makes it easier to transfer files between two computers, it goes without saying that you must also have croc installed on the other device. Visit Croc's GitHub for instructions on how to install it on your device.
How to use Croc to share files
With Croc installed on your computers, you can now use it to do both: share files and receive files. Depending on your use case, follow the instructions below to transfer files to / from your Linux computer.
Transfer files from Linux to another device
In situations where you want to transfer files from your Linux machine to another computer (with a different operating system), please follow the steps below to complete the send process in Croc.
Since the entire process is done from the command line in Croc, make sure you have it open on both computers. Then on your sending device, in this case your Linux computer, type the following command into the terminal and press Enter:
croc send file_name
croc send MyText.txt
Once you do that you will see a code just below that Send Message. You can use this code to receive the files on another computer.
Go back to the command prompt on the receiving computer and enter the command using the following syntax:
For example if your code is alpha1, you have to enter:
Enter Yes to accept the incoming file and download it to your device.
As soon as the code matches on both machines, a PAKE is created and the transmission begins. The program also generates a secret key for end-to-end encrypted data transmission between both parties.
Although croc's random code phrases do the job, sometimes they can be too long to type in. Alternatively, you can generate a custom code yourself when initiating the transfer. To do this, change the command syntax as shown below:
croc send –code your_code_phrase file_name
Similar to sending files, Croc also lets you send text, which can be handy when you want to share a message or url. Use the following syntax to send a text via Croc:
croc send –text "your_text_here"
croc send –text "hello"
On the receiving device, enter the code phrase generated by the above command and press Yeswhen prompted to view the message.
Receiving files from another device on Linux
Similar to sharing files from your Linux computer, there may be times when you want to transfer files from another device to your Linux computer.
In such situations, you can simply reverse the process as shown in the steps below.
On the sending computer, open the command line and do the following:
croc send file_name
Go back to your Linux computer and in the terminal window type:
Please enter again Yes to accept the file.
Easily transfer files between computers
Most file transfer apps these days offer cross-platform functionality. However, what sets Croc apart from the rest is its ease of use, fast and secure nature, which makes it easy to transfer files between computers running different operating systems.
In fact, croc is said to be the only CLI-based file transfer tool with such a rich feature set, making it a perfect file transfer companion for those who prefer to work from the command line.
However, you can also check out qrcp, a free file transfer utility that uses QR codes to help you transfer files between Linux, Android, and iOS.
How to transfer files between Linux, Android, and iOS using qrcp
Do you want to share files quickly and easily between a Linux desktop and a smartphone? Check out qrcp, a free file transfer utility that uses QR codes.
About the author
(28 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. Aside from technology, he likes to talk about astronomy, Formula 1 and clocks.
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