How to install Rsync
Install Rsync on Ubuntu, Debian, CentOS, Fedora, RHEL, and macOS with package manager commands and verify the installation.
Install the Rsync file synchronization utility on a Linux or macOS system using the native package manager.
Prerequisites
- A Linux or macOS system with terminal access.
- Root or
sudoprivileges to install packages. - An active internet connection for downloading packages.
Step-by-Step: Install Rsync
Check whether Rsync is already installedby running the version command. Rsync comes preinstalled on most Linux distributions and macOS.
rsync --versionRsync prints its version number and supported capabilities if it is installed. If the command returns "command not found," proceed to the next step.
Update the package indexto ensure the package manager fetches the latest available version of Rsync.
=== "Ubuntu / Debian"
sudo apt update=== "CentOS / Fedora / RHEL"
sudo dnf check-update=== "macOS (Homebrew)"
brew updateInstall Rsyncusing the system's package manager.
=== "Ubuntu / Debian"
Rsync installs from the default APT repository on Ubuntu and Debian.
sudo apt install rsync=== "CentOS / Fedora / RHEL"
Rsync installs from the default DNF (or YUM) repository on CentOS, Fedora, and RHEL.
sudo dnf install rsync=== "macOS (Homebrew)"
Rsync installs via Homebrew on macOS. The Homebrew version is typically newer than the system-bundled Rsync.
brew install rsync
How to Verify the Rsync Installation
Rsync displays its version number, protocol version, and compiled capabilities when the
--version flag is passed.
rsync --versionRsync outputs a version string similar to:
rsync version 3.2.7 protocol version 31Confirm that the version number appears. A successful output confirms that Rsync is installed and available in the system PATH.
Common Issues When Installing Rsync
Rsync installation fails with "Unable to locate package rsync" on Ubuntu or Debian when the package index is outdated. Run
sudo apt update before retrying the install command.
Rsync installation fails with "No package rsync available" on CentOS or RHEL when the EPEL repository is not enabled. Enable EPEL with
sudo dnf install epel-release and retry.
Rsync on macOS via Homebrew requires the Xcode Command Line Tools. Install them with
xcode-select --install if Homebrew reports a missing compiler.