March 31, 2008

Installing rar and unrar programs in Linux or Unix

I recently notice that I got some visitors bump in this coder's talk blog, searching for How to create and extract rar files in linux and I do remember that I didn't put on how to install rar and unrar program in other distributions of linux. I'm so sorry, my mistake.

However, I am a linux supporter and I don't want to make you upset while bumping into this blog and didn't really get what you need. So, here is how to install rar and unrar on other linux distributions...

Under Debian Linux, you can use the same apt-get method as follows to install unrar program:

$ apt-get install unrar

If you are using Fedora core Linux then use yum command as follows:
$ yum install unrar

If you are using FreeBSD, you can use:
$ pkg_add -v -r unrar

If any of above, methods is not working, you can download binary package from official rarlab site and choose the right package for your machine... for example, i chose the latest (by the time i write this post):
$ cd /tmp
$ wget

then untar the file:
$ tar -zxvf rarlinux-3.7.1.tar.gz

Both rar and unrar 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

Then you can use the same method on creating and extracting rar files in linux in my previous post.

Another thing to add, you can also test the integrity of archive, with this command:
$ unrar t filename.rar 

or list the files inside the rar file using this command:
$ unrar l filename.rar

that's it... hope it helps...

Share This Article:

Bookmark This Article:
Feed Me Digg Technorati Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy


Text to Screen said...

Do you have a list of commands to use with unrar?

ApOgEE said...

Sure, I have it. You have it too. just type "unrar --help" (without quotation mark) on your terminal.

If you need further explanation, try issuing "man unrar" (without quotation mark) on your terminal for the manual.

Good Luck!

doggybounce said...

Nice. here is a handy script for extracting many rar files all at once