How to Install UNRAR on Fedora Linux


If you’re a Linux user working with RAR archive files, then you have likely heard of Unrar before. This powerful tool is ideal for extracting such files on the Fedora system. This tutorial will provide details on installing Unrar on Fedora using the free version bundled on Fedora or for users requiring a commercial product to install RAR from RARLabs.

Update Fedora

First, it is often best to ensure your system is up-to-date before proceeding with any tutorial to avoid conflicts. This can be skipped for users that constantly keep their system up-to-date; if you have not checked for a while, run the following command.

sudo dnf upgrade --refresh

Method 1: DNF Package Manager (unrar-free)

Step 1: Install unrar

By default, unrar is available on Fedora-based systems. Run the following command to install.

sudo dnf install unrar

Step 3: Verify the installation

You can verify the installation by running the unrar command in the terminal

unrar --version

Example output:

unrar-free 0.1.2

To bring up the commands, use the following command.

unrar-free --usage

Example output:

sage: unrar-free [-xtfp?V] [--extract] [--list] [--force] [--extract-newer]
            [--extract-no-paths] [--password] [--help] [--usage] [--version]
            ARCHIVE [FILE...] [DESTINATION]

Method 2: Manual with installing RAR

The next method may suit most users porting from Windows and utilizing WinRAR; you can install the Linux version named RAR. Note for unfamiliar users. This is trial software; you will be prompted to buy it constantly.

Step 1: Download the unrar source code

First, you will need to download the RAR from the official website. Open a terminal and navigate to the directory where you want to download the source code.

Visit the official RARLAB website, and then use wget to download it via your terminal. An example command is below.

wget https://www.rarlab.com/rar/unrar-{visit-rarlab-website-get-latest-link}

In the tutorial I will install the version 6.12, but please do not copy this, as RAR constantly changes with updates.

64-bit:

wget https://www.rarlab.com/rar/rarlinux-x64-620b3.tar.gz

32-bit:

wget https://www.rarlab.com/rar/rarlinux-x32-612.tar.gz

Example of the webpage to find download links for Linux:

Right-click to copy new links for either x64 or x86.

Step 2: Extract the source code

Next, you will need to extract the source code from the downloaded archive. Run the following command to extract the source code.

tar -xvzf rarlinux-*-*.tar.gz

Step 3: Navigate to the extracted directory.

Use the following command to navigate to the extracted directory.

cd rar

Step 4: Compile the source code

In the extracted directory, run the following command to start the compilation process:

sudo make install

Example output:

mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib

Step 6: Verify the installation

You can verify the installation by running the unrar command in the terminal

rar -iver

Example output:

6.20 beta 3

To print out the command options, you can use the following command.

rar

Example output:

Conclusion

This guide has gone over two options for installing UNRAR. Installing the free version is probably the best for most users, but sometimes issues may occur compared to the latest version from RARLab. If it becomes an issue, you may need to look into alternative data compression solutions that are better supported on Linux.

See also
How to Install Skype on Fedora Linux

Leave a Comment

Share to...