Install Rclone on Ubuntu 26.04

Install Rclone on Ubuntu 26.04

Rclone is a command-line utility designed for managing files across various cloud storage providers. It supports syncing, copying, moving, and managing data between local storage and remote providers. It provides a unified interface for working with different storage providers, allowing files to be transferred and managed without using provider-specific tools. This tutorial explains how to install Rclone on Ubuntu 26.04.

Prepare environment

The unzip package is required to extract the Rclone binary from the downloaded archive.

sudo apt update
sudo apt install -y unzip

Install Rclone

Get the latest Rclone release version from the GitHub:

RCLONE_VERSION=$(curl -s "https://api.github.com/repos/rclone/rclone/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')

Download the appropriate archive:

curl -sSLo rclone.zip https://github.com/rclone/rclone/releases/latest/download/rclone-v$RCLONE_VERSION-linux-amd64.zip

Extract the Rclone executable and place it in the /usr/local/bin directory:

sudo unzip -jq rclone.zip '*/rclone' -d /usr/local/bin

To verify installation, check the Rclone version:

rclone --version

Remove the downloaded archive after installation:

rm -rf rclone.zip

Testing Rclone

Rclone is commonly used to transfer and synchronize data between local directories and cloud storage providers. A simple way to verify that the installation works is to copy a local file.

For example, the following command copies the dpkg.log file from /var/log into the current working directory:

rclone copy /var/log/dpkg.log .

To configure a remote storage connection use the rclone config command. It starts an interactive setup session. During the configuration process, a storage provider can be selected, authentication details can be entered, and remote connection settings can be configured.

Uninstall Rclone

If decided to remove the Rclone from the system, delete the installed binary:

sudo rm -rf /usr/local/bin/rclone

Rclone stores remote configuration files in the user configuration directory. Remove them as follows if they are no longer required:

rm -rf ~/.config/rclone

The unzip package was installed only for extracting the Rclone archive. If it is no longer required, it can be removed as follows:

sudo apt purge --autoremove -y unzip

Leave a Comment

Cancel reply

Your email address will not be published.