Skip to content

How to Install and Use Rsync on Ubuntu 22.04

How To Install and use rsync on ubuntu 22.04
What is rsync in ubuntu?

Rsync is a fast and universal file transfer utility for Linux and Unix-like operating systems. It is used for transferring, synchronizing, and backing up files and directories efficiently. It’s also used for multiple systems (Like: Server to Server, Server-to-local).

This tutorial will guide you through the process of installing and using rsync on Ubuntu 22.04 or any other version.

Rsync requirements:

  1. A running Ubuntu 22.04 system with root access
  2. A basic understanding of the terminal and Linux commands
  3. Sudo privilege user
How do I install rsync on ubuntu 22.04 | 20.04 | 18.04?

Here’s a step-by-step guide to installing rsync on ubuntu linux:

Step 1: Update your ubuntu system:

Before directly installing the rsync package it’s recommended to fetch the remote package index and run the following command for the update.

sudo apt-get update

Step 2: How to install rsync ubuntu terminal

For Installing rsync package, open a terminal and run the following command to install rsync on Ubuntu 22.04:

sudo apt-get install rsync -y

Step 3: How to use rsync in ubuntu linux?

Using Rsync To use rsync, you must specify the source and destination of the files or directories you want to transfer. Here’s the basic syntax for using rsync:

rsync [OPTIONS] SOURCE DESTINATION

Step 4: Extra tip on rsync usage examples

Assume that we want to transfer the /home/user/example directory to /mnt/backup, todo that execute the following command in your terminal:

rsync -avz /home/user/example /mnt/backup

Options manual:

  • -a : archive mode, preserving the attributes of the files and directories
  • -v : verbose mode, displaying the progress of the transfer
  • -z : compress mode, compressing the data before transferring
rsync uses examples debian

Step 4: How to remove rsync in linux

To remove rsync, run the following command in the terminal:

sudo apt-get remove rsync

Note: If you want to remove its dependencies:

sudo apt-get autoremove

This command will remove all the dependencies of rsync.

The Short Note:

In this tutorial, we learned how to install rsync on linux or any other version of ubuntu. Whether you’re a beginner or an advanced pro user, rsync is an essential tool to have in your Linux toolkit.

For reading rsync documentation:

man rsync

Thanks 🙂

Related blog: How to Change Root Password on Ubuntu 22.04?

Leave a Reply

Your email address will not be published. Required fields are marked *