RAR is the most popular tool for creating and extracting compressed archive (.rar) files, but unfortunately, the Rar tool doesn't pre-installed under Linux systems, we need to install it using third-party tools to open, extract, uncompress or unrar archive files.
In this context, we shall look into how to install Rar/Unrar on CentOS 8.
Steps to install Rar / Unrar on Centos 8
1. Perform System Update
First, let's start by ensuring your system is up-to-date:
$ sudo dnf install epel-release
$ sudo dnf update
2. Install Rar / Unrar on the system
Now we run the following command to install Rar/Unrar:
$ wget https://www.rarlab.com/rar/rarlinux-x64-6.0.2.tar.gz
$ tar -zxvf rarlinux-x64-6.0.b2.tar.gz
$ cd rar
$ sudo cp -v rar unrar /usr/local/bin/
There's no need to compile or anything. The binary on the tar file works out of the box. On the above example, we copy it /usr/local/bin so it is found by default after login on our system.
How to Open RAR File / Extract RAR Files ?
Below are some useful and helpful Rar/Unrar archive commands:
- # unrar x (file_name).rar - extract with full path
- # unrar e -kb (file_name).rar - (Keep broken)
- # unrar l (file_name).rar - list files inside
- # unrar e (file_name).rar - dump files excluding folders
- # rar a (file_name).rar (file_name) - create a archive Rar file
- # rar r (file_name).rar - recover or fix a archive file or files
- # rar a -p (file_name).rar - create a archive Rar file with password
[Need assistance in fixing Linux system issues ? We can help you. ]
This article covers how to install Rar/Unrar on CentOS 8 system. In fact, RAR files are archived by Winrar compression software and can be split into large files.