Open rar file or Extract rar files under Linux or UNIX

FreeBSD, Linux, Windows, UNIX, Ubuntu Linux, Suse, RedHat and Friends

RAR files are in compressed format if you have downloaded rar files from Internet, you need to unpack or unrar them (extract rar files).

RAR is a proprietary file format for data compression and archiving, developed by Eugene Roshal.

Under Linux and UNIX, use command called unrar. By default unrar is not being installed on Linux, FreeBSD or UNIX oses. You can install unrar command with the help of apt-get or yum command.

Install unrar command

Under Debian Linux, you need to type apt-get as follows to install unrar program:

# apt-get install unrar

If you are using Fedora core Linux then use yum command as follows (see discussion below):

# yum install unrar

If you are using FreeBSD, use:

# pkg_add -v -r unrar

If any of above, methods is not working for you, download binary package from official rarlab site :

$ cd /tmp
$ wget

Untar file

$ tar -zxvf rarlinux-3.6.0.tar.gz

Both unrar and rar commands are located in rar sub-directory. Just go to rar directory:

$ cd rar
$ ./unrar

Now copy rar and unrar to /bin directory:

# cp rar unrar /bin

How to use unrar

unrar command supports various options below are common options that you need to use everyday.
Task: To open rar (unpack) file in current directory type command:
$ unrar e file.rar

Please note that replace file.rar filename with your actual filename.
Task: List (l) file inside rar archive:
$ unrar l file.rar

Task: To extract (x) files with full path type command:
$ unrar x file.rar

(D) To test (t) integrity of archive, file type command:
$ unrar t file.rar

source link

Good luck )


5 thoughts on “Open rar file or Extract rar files under Linux or UNIX

  1. Nazim says:

    Really very helpful for me.

  2. Aditya says:

    You are really doing good. It helped me a lot……Linux Rocks………..

  3. thank you, it helped me

  4. Anil says:

    Gud info man…i had a rar file and wanted to unrar it and searched in google, found this page…It helped my purpose..thanku …keep rocking

  5. Kris says:

    Awesome, Thanks..

Comments are closed.