How to extract RAR files in Ubuntu 22.04

The RAR (Roshal Archive Compressed File) is a compressed form of the WinRAR archive and can be used to compress the files to reduce their size so that they can be easily emailed. RAR file utility is included in Microsoft Windows by default, but in Ubuntu we need to install some third-party applications to extract the files from RAR files.

This article discovered a method to extract the files on Ubuntu 22.04 using command line interface.

How to unzip RAR files in Ubuntu 22.04?

The RAR files are the compressed files described above and include the “rar” extension with their names. To extract them in Ubuntu, a package is installed from unrar with the following command:

$ sudo suitable To install unrar -y

When the installation is complete, it’s time to learn how to use the unrar package to extract the RAR files. For this we have a sample RAR file for the user’s better understanding; Navigate to the rar files folder with the command:

$ CD ‘rar files’

List the files of the “rar files” directory by running the following command:

$ ls

There is a “sample.rar” available that can be extracted with the unrar package. Run the following command to view the contents of the RAR file using the Unrar utility:

$ entrar l sample.rar

Run the following command to extract all these files in the same directory using the unrar utility:

$ unrar e sample.rar

In the output above, you can see that the sample.rar files were extracted using the unrar package. We used the unrar utility’s “e” command, which extracts the files without their archived path. Similarly, there are some other Unrar utility commands that can be found out by running the command:

$ unrar

All Unrar utility options will appear on the screen.


Installing the Unrar utility on Ubuntu and running the command “unrar e filename.rar” can extract RAR files in Ubuntu 22.04. This article explained the installation method of unrar and how to use it with an example.

Related Posts