Fedora

How to Extract a RAR File on Fedora Linux

RAR or Roshal Archive files are similar to zip files but use a proprietary compression algorithm. That’s why RAR files generally provide a higher compression ratio compared to the zip files. You can use the RAR files to create highly compressed files. However, RAR files require specific tools to extract them since RAR files use a proprietary algorithm.

Therefore, you need the correct knowledge before extracting the content from the RAR file in any operating system, including any Linux distro. So, in this guide, we will explain the different methods to extract a RAR file on Fedora Linux.

How to Extract a RAR File on Fedora Linux

Let’s divide this section into different parts to explain the multiple commands and GUI methods to open a RAR file on Fedora Linux.

Using the Unrar Command

If your system does not contain the “unrar” command utility, run the following command to install it:

sudo dnf install unrar

Once you install the “unrar” command utility, it is time to extract the RAR file. For example, the “4k.rar” file is available in the “Documents” directory. So, you need to run the following commands to extract it:

cd ~/Documents

unrar x 4k.rar

Similarly, you can specify the directory path to shift the extracted RAR file. For instance, let’s extract the “4k.rar” file in the “Downloads” directory:

unrar x 4k.rar ~/Downloads

The -P Option

If your RAR file is password protected, use the -p option with the “unrar” command. For example, the “4k.rar” is a password protected file, so you need to run the following command to extract it:

unrar x -p12345 4k.rar

In the previous command, 12345 is the password of the RAR file.

From the File Manager

If you don’t want to go for the commands, locate the RAR file destination and right-click on it:

You will get multiple options here. So, click on “Extract” to extract the file in the same directory. In case you want to extract the RAR file from any other directory, click on the “Extract to” option and the system will ask you to select the specific directory:

Conclusion

This is how you can easily extract a RAR file on Fedora Linux. We explained the multiple methods to extract the RAR file in the same or any other directory. Furthermore, the “unrar” command contains various options to specify the conditions to extract the RAR file. Hence, if you want to know more about these options, you can run the “unrar –help” command in the terminal.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.