How to install Unrar Debian 11 Bullseye or 10 Buster Linux

Just like with ZIP, RAR is another format for compressing and creating archive files on PC or laptop. This process compresses data and reduces storage space. RAR (.rar) is one of the common file compression formats. Therefore, if you are using Debian 11 or 10 and want to use unrar to extract RAR format archive files downloaded from the web, here are the steps to follow.

Unrar is the tool available in the Debian Base repository for extracting compressed archive files (.rar). Well, we have to install it manually because Unrar is not pre-installed on Linux systems.

Here we learn not only the method to install Unrar on Debian 11 or 10, but also how to use its command line to extract or unzip a RAR archive file.

Install and use Unrar on Debian 11 or 10 Linux to extract RAR files

Step 1: update apt

Run the system update command to refresh the system APT cache and also to install if any updates are available for your system.

sudo apt update

Step 2: command to install Unrar in Debian 11 or 10

As I said in the introduction, Unrar is available through the default Debian Linux base repository, so just use the APT package manager to grab its packages and install them using the command given:

sudo apt install unrar-free

Step 3: Unrar options to use

Once the installation is complete, we can see what options are available to use with this command line tool. To do this, use the help parameter.

unrar --help

Here is the output:


Extract files from rar archives.

-x, --extract                Extract files from archive (default)
-t, --list                   List files in archive
-f, --force                  Overwrite files when extracting
    --extract-newer          Only extract newer files from the archive
    --extract-no-paths       Don't create directories while extracting
-p, --password               Decrypt archive using a password
-?, --help                   Give this help list
    --usage                  Give a short usage message
-V, --version                Print program version

Then we learn if we already have some .rar then how to use unrar to extract or unzip the same using command line:

unrar -x filename.rar

To replace the filename.rar with the actual RAR file you want to extract.

For example:

I have a file called sample.rar in the Downloads folder, then I’ll go to the Downloads folder first.

cd Downloads

And then to list the files that are available there, you can use:


Now to extract just use Unrar with either X Where e option with the name of the file.

unrar -x sample.rar


unrar -e sample.rar

Command to extract RAR file using Unrar tool in Linux

Step 5: To list contents of RAR file

Before extracting the contents of some RAR compressed files using Unrar on Linux, we can list all available folders and files inside directly on our command terminal. For this use -t option.

unrar -t filename.rar


unrar -t sample.rar

List the contents of the Rar file on Debian Linux

If you don’t want to extract contents of RAR file to same directory where it exists, we can mention other directory for it.

For example, let’s create a directory called: Test

mkdir test

Now extract the rar content in the Test folder.

unrar -x filename.rar /path-of-foler


unrar -x sample.rar ~/Downloads/test/

Unrar file in another directory

Step 7: Unzip or unzip a password protected RAR file

Well, it often happens that we get password protected RAR file from web or email. Use -p option.


unrar -x -p filename.rar


unrar -x -p pass-sample.rar

Enter the password.

Extract Password Protected RAR File on Debian Linux

Other articles:

• How to upgrade Debian 10 Buster to 11 Bullseye Linux
• Linux Zip commands to check in or check out files
• Install WPS Office on Debian 11 Bullseye

Comments are closed.