How To Extract RAR Files under Linux / Unix Environment

I was always curious about how to unpack the RAR files under Linux or Unix environment.
RAR is a proprietary file format for data compression and archiving, developed bu Eugene Roshal. The RAR  is nice format for compression of data as it reduces the file size to a great extent also enables ease the distribution and sharing. We can simply use the command unrar to extract the rar files under Linux/Unix environment however unrar is not present there by default. So here is quick guide from scratch on how you can extract the rar files under Linux.

Install UNRAR:
For Debian or Ubuntu Linux you need to issue the following command to install unrar

apt-get install unrar

For Fedora core Linux/ CentOS / RHEL use the below command

yum install unrar

If you're using any other version or having troubles with the commands then simply download the unrar files from their official website for your machine.


Untar the downloaded file:
type the below command

tar -zxvf rarlinux-3.6.0.tar.gz

Now copy rar and unrar files to bin directory

Using UNRAR command:
The unrar command is active now and it also supports mulitple options
To extract the files in current directory, type

unrar e file.rar

List Files inside archive

unrar l file.rar

To test integrity of archive, type

unrar t file.rar

I hope you're done. Still having troubles then feel free ping me anytime.

See you next time.
Next Post »