For system, network and cloud administrators
All over the web, you might encounter some much needed files are archived using RAR, like your Linux course certification files, for example. That’s when, it’s useful to know how to extract them using the proper software.
If you’re using an Ubuntu or Debian based distribution, you can use the free version of unrar and you can install it using the following command:
sudo apt install -y unrar-free
Create a folder and extract your files inside it using the following command:
unrar -x yourfile.rar /path/to/your/folder/
As you may have noticed, the -x flag is actually telling the program to start the extraction process. And you can also use the:
If you’re using a RHEL based distribution such as, CentOS, for example, you can use the unar package; the thing is, you’ll first have to install the epel-release package and then you’ll be able to install:
sudo yum install -y epel-release
sudo yum install -y unar
But if you’re using, let’s say, Fedora, then you can just use the following command:
sudo dnf install -y unar
Now, in order to extract the .rar archive using the unar package, you can use the following command:
unar yourfile.rar