Thursday, June 16, 2022

Extract rar Files in CentOS Linux



How to Extract rar Files in CentOS Linux

To extract rar file in CentOS 7, We need to install package called unar (Not unrar), Then we can extract rar files using the unar utility.

Install unar on CentOS.
Extract rar files with unar.
Extract Password Protected rar files.
Install unar on CentOS Linux

The unar for CentOS 7 provides by the epel repository, So first enable the epel repository.

yum install epel-release

Then install unar on CentOS using yum command.

yum install unar

Don’t misspell the package name, it is unar not unrar.
Extract rar files in CentOS with unar

To extract .rar archive file from the command line, execute unar command followed by the name of the archive file.


unar example.rar

By default archive file will extract to the current working directory. To extract rar file to a different directory, we need to use -o option.


unar -o /opt example.rar

As per the above command The .rar archive example.rar will unrar to the /opt directory.
Unrar Password Protected rar files in CentOS

By default unar command will prompt the password if the rar file is password protected.


Or we can specify the password with -p option.


unar -p 123456 centos.rar
Extract rar files in CentOS Desktop

When we have unar package installed, we can unrar archive files from the GUI.

To unrar a archive file using the GUI, Right click on the .rar file and select Extract Here.

Summary

In this tutorial we learned how to extract .rar archive format in CentOS 7.In Order to Unrar .rar files, we need to install unar package which is provided by the epel repository for CentOS 7.
Once we install unar, we can extract archive files using both command line and the GUI.

No comments:

Post a Comment

How to get Ranking of the Students in Excel using RANK Function

=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...