How to Install and Use Croc to Securely Transfer Files and Folders 🐊
Croc is a tool that allows you to easily and securely send things from one computer to another. It uses a code phrase to establish a password-authenticated key agreement (PAKE) which generates a secret key for end-to-end encryption. It also uses a relay server to connect any two computers without port-forwarding or local server setup. Croc works on Windows, Linux, Mac, and even Android devices. In this blog, I will show you how to install croc using CLI on different platforms and how to use it to transfer files and folders.👇
Install Croc on Linux 💻
There are different ways to install croc on Linux depending on your distribution. Here are some of the most common ones:
- On Ubuntu and other Debian-based distros, you can download the latest release (.deb package) from the project GitHub page² and install it with
sudo dpkg -i croc_*.deb. - On Arch Linux, you can install croc from the official repositories with
sudo pacman -S croc. - On Fedora, you can install croc with
sudo dnf install croc. - On Gentoo, you can install croc with
sudo emerge net-misc/croc. - On Termux, you can install croc with
pkg install croc. - On Nix, you can install croc with
nix-env -i croc. - Alternatively, you can install croc from source by downloading the latest release from the project GitHub page² and running
go install github.com/schollz/croc/v9@latest(requires Go 1.17+).
Install Croc on Windows 💻
To install croc on Windows, you can use one of the following methods:
- Download the latest release (.exe file) from the project GitHub page² and run it as administrator.
- Use Scoop to install croc with
scoop install croc. - Use Chocolatey to install croc with
choco install croc. - Use Winget to install croc with
winget install schollz.croc.
Install Croc on Mac 💻
To install croc on Mac, you can use one of the following methods:
- Download the latest release (.zip file) from the project GitHub page² and unzip it.
- Use Homebrew to install croc with
brew install croc. - Use MacPorts to install croc with
sudo port selfupdate && sudo port install croc.
Install Croc on Android 📱
To install croc on Android, you can use the 3rd party F-Droid app available to download².
How to Use Croc 🐊
To use croc, you need to run it on both the sender and the receiver computers. Here are the basic steps:
- On the sender computer, run
croc send [file(s)-or-folder]where[file(s)-or-folder]is the path of the file or folder you want to send. Croc will generate a code phrase for you and display it on the terminal. - On the receiver computer, run
croc [code-phrase]where[code-phrase]is the same code phrase shown on the sender terminal. Croc will ask you to confirm the file transfer and then start downloading the file or folder to your current directory. - If the transfer is interrupted for some reason, you can resume it by running the same commands again.
You can also customize some options for croc such as changing the code phrase, setting a custom relay server, enabling compression, etc. You can see all the available options by running croc --help.
Conclusion 🎉
Croc is a handy tool that makes it easy and secure to transfer files and folders between different computers and platforms. It uses a simple code phrase mechanism to establish encryption and a relay server to connect any two computers without hassle. You can install croc using CLI on Linux, Windows, Mac, and Android devices and use it with just a few commands. I hope this blog was helpful for you and if you have any questions or feedback, feel free to leave a comment below.😊