1. Home
  2. Linux
  3. Extract rar files on linux

How to extract RAR files on Linux

If you want to extract RAR files on Linux, you need the “Unrar” package. Without this package on the system, it is not possible to interact with or extract RAR files on Linux at all.

Rar is a closed, proprietary format, and developers on Linux, as well as the community in general, don’t care that much about the format. The only reason tools like Urar exist is for when, inevitably, you run into a RAR archive (usually through downloading) and you need to extract it while using the Linux platform.

Install Unrar

Installing the Unrar package is easy enough as most mainstream Linux distributions have the software in their software sources. To install the Unrar package, open up a terminal window and follow the instructions that match the operating system you use.

Note: The Unrar utility for Linux works very well with RAR archives that are version 3.0 or older. However, it has considerable trouble working with the newer proprietary RAR format (version 5.0,) and absolutely will not work with 5.0 files till the developer adds new features to the tool.

Ubuntu

Unrar supports Ubuntu quite well, and the program can be found in its primary software sources. To get your hands on the Unrar utility, open up a terminal window and enter the following Apt command into it to get it going.

sudo apt install unrar

Debian

Debian Linux has the Unrar package in their primary software sources. To get your hands on it, launch a terminal window and enter this Apt-get command.

sudo apt-get install unrar

Arch Linux

Using Arch and need to install the Unrar utility? Try this Pacman command on for size!

sudo pacman -S unrar

Fedora

The Unrar utility is in the primary Fedora Linux software repository. To install it, you must enter the DNF command below.

sudo dnf install unrar

OpenSUSE

To get the Unrar RAR extraction tool on OpenSUSE, write out this Zypper command into your terminal window.

sudo zypper install unrar

Extract RAR files – Terminal

Many archiving programs on Linux make use of Unrar to extract RAR files. However, it’s possible to interact with Unrar and use it to extract archive files directly from the Linux terminal. Here’s how to do it.

Step 1: Find the location of the RAR archive(s) you wish to extract on your Linux computer with the locate command.

locate *.rar

Step 2: Take note of the output location of the RAR archive. Or, copy it to your clipboard with the mouse.

Step 3: Write out unrar, followed by the e switch and the location of the file from Step 1.

unrar e /home/username/path/to/rar/file.rar

Step 4: Run the ls command to view the result of the extraction process.

ls

Find the name of the folder that came out of your RAR archive and take a note of it.

Step 5: Using the CD command, move the terminal session into the file folder.

cd extracted-rar-file-folder

Step 6: View the items in the RAR file folder by re-running the ls command.

ls

Extract RAR files – Gnome desktop

If you install Unrar, you’ll be able to use it to extract RAR archive files with Gnome’s Nautilus file manager. To extract, launch the Nautilus file manager. Then, navigate to the location of the archive file on your Linux PC, or, search for it by clicking the search icon.

Once you’ve found the RAR file in Nautilus, right-click on it and select the “Extract Here” menu option to extract the RAR file in Gnome immediately. Alternatively, double-click on the RAR to open it in Gnome’s Archive Manager app and access the files that way.

Extract RAR files – KDE Plasma desktop

KDE’s Dolphin file manager can handle and work with RAR format files if you have the Unrar utility installed. If you’d like to use it to extract RAR files, start by opening up Dolphin. From there, locate the file you’d like to extract (or use search to find it) and right-click on it.

In the right-click menu, select “Extract,” followed by “extract here, autodetect sub-folder.” Don’t want to extract from Dolphin? Double-click on the RAR archive to open it up in KDE’s ARK tool.

RAR extraction – other GTK+ desktops

Those who aren’t using Gnome Shell’s Nautilus or KDE Plasma 5’s Dolphin need not worry: Unrar is used as the backend for extracting RAR archives in most file managers and archive extraction tools on the Linux platform. If you’re new to Linux and use a desktop like XFCE, Mate, etc., here’s how to extract the files.

Step 1: Launch the Linux file manager, then, find the RAR archive you wish to extract.

Step 2: Right-click on the RAR archive, then, look in the right-click menu for “extract,” or a similar option and select it to extract the files.