Anda di halaman 1dari 25

Open rar file or Extract rar files under Linux or UNIX

Low graphics
Shell Scripts

Linux FAQ / Howtos

powered by
Blog: The Best Open Source Graphics And Design Software

Open rar file or Extract rar files under

Linux or UNIX
by Vivek Gite on February 8, 2006 · 126 comments

Q. How do I open rar archive files under Linux / UNIX operating


A. RAR files are in compressed archive format, if you have downloaded

rar files from the 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.
(See below for Windows XP info)

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
# yum install unrar

If you are using FreeBSD, use:

# pkg_add -v -r unrar

1 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

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

How do I open rar file under Windows XP/NT/2000?

Windows XP or NT/2000 user

If you are using Windows XP then I recommend to download Winrar. It is free

download ( Free to try License) software.

Email Ads by Google

2 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

Featured Articles: Comment/RSS

20 Linux System Monitoring Tools Every SysAdmin Should Know

20 Linux Server Hardening Security Tips
My 10 UNIX Command Line Mistakes
The Novice Guide To Buying A Linux Laptop
10 Greatest Open Source Software Of 2009
Top 5 Email Client For Linux, Mac OS X, and Windows Users
Top 20 OpenSSH Server Best Security Practices
Top 10 Open Source Web-Based Project Management Software
Top 5 Linux Video Editor Software

{ 126 comments… read them below or add one }

1 ajos1 February 21, 2006

On my Redhat FC4… says there is no unrar or rar… does this package go under a
different name?

[root@www ~]# yum install unrar

Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: unrar
Nothing to do


2 nixcraft February 21, 2006

You need to point out to use dag RPM Repository for unrar command under
Fedora Core Linux. I have following line in my /etc/yum.conf file:

name=Dag RPM Repository for Fedora Core

Save file and import PGP key:

rpm –import

Upgrade your system by typing following command:

yum update

Install unrar:
yum install unrar

Or just download RPM file from dag site

3 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX


3 joe December 27, 2006

nixcraft – that dag repo is giving a 404:

Setting up repositories
dag [1/4] [Errno 14] HTTP
Error 404: Date: Wed, 27 Dec 2006 16:22:50 GMT


4 nixcraft December 27, 2006


Grab unrar/rar software from install the

same. Type the following commands as root user:
cd /tmp
tar -zxvf rarlinux-3.6.0.tar.gz
cd rar
cp rar unrar /bin

Now you can use rar and unrar


5 raja August 7, 2010

thanx nix, now i am able to open rar fies


6 Uwan August 12, 2010

Thank u very much brother.

I get new idea as linux user.
Thank u again lot.


7 Eliade January 2, 2007

Hi nix, well how to handle *.lzh file on linux?

I want to extract it….


8 nixcraft January 2, 2007


4 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

Files with .lzh or .lha extensions have been compressed with the LHa, LHarc, or
LHx compression utilities. You need to use lha command.

lha x file.lhz

Download link

Hope this helps


9 Ranjan February 5, 2007

Thanq.This info is exactly matched my requirement.


10 Arun February 7, 2007

hey nixcraft thanks for the info.. :)

really helpful


11 Mike February 7, 2007

This is just what I have been looking for, thanks!


12 Daniel February 26, 2007

when i try and use unrar i get the following error:

unrar: /lib/tls/ version `GLIBC_2.4′ not found (required by unrar)

how do i fix this? can someone perhaps kindly point me to another article or some
instructions? thank you!


13 nixcraft February 26, 2007


What distro you are using? You need to have updated version of GLIBC.


14 pranjal karwal March 17, 2007

thanks dude it works! thanku for such an easy guide :)

5 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX


15 AudioTravel March 29, 2007

Thanks for this info! Ultimately this forwardet me to:
That worked great for me. I think there might be a typo in the posting. I am using
Centos Linux, so I thought I’d post what exactly I did:

•rpm -Uvh unrar-3.6.2-1.el4.rf.i386.rpm
•unrar e rarfile.rar



16 Alex April 3, 2007

Thanks nixcraft for your nice guide, worked like a charm.


17 Blind April 8, 2007

How am i suppose to run these commands? Sorr


18 Margaux May 24, 2007

How do I fix this error

Cannot find volume GA_-_S2E13_-_Begin_The_Begin.part2.rar

Grey’s Anatomy – Season 2 – Episode 13 – Begin The Begin.avi – CRC failed
Total errors: 1

i’m very sure that i’ve downloaded it and it is in my Desktop…



19 sleestak July 19, 2007

Thanks for providing this info. Very helpful.


20 Ritu August 2, 2007

6 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

cd /tmp
tar -zxvf rarlinux-3.6.0.tar.gz
cd rar
cp rar unrar /bin

but the result is

$ ./unrar
./unrar: /lib/tls/ version `GLIBC_2.4′ not found (required by ./unrar)

can any one tell me what is the problem?


21 Tushar Tandulkar August 10, 2007

Very nice help for unrar, thanks


22 Pavan Kumar August 23, 2007

Thanks Man.. The Unrar stuff works pretty nice.


23 Vikas August 29, 2007



24 Alex September 18, 2007

There is a program – RAR fix, able can extract information even from those
compressed files that are protected with a password, works with all variants of this
format and can recover data from archives and corrupt rar files with various
compression rates and created in different software.


25 nmuthukumar September 21, 2007

Here but it asks password to open the file


26 biswajit deka September 27, 2007

hi, am using fedora linux and not able to install unrar using yum install unrar
it shows an error as No Match Argument rar.
please help me out of this.

7 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX


27 Janis October 10, 2007

I’ve heard you could also use 7zip to extract RAR files under *nix. That might be
easier for some than using the method described in this post.


28 matt October 11, 2007

need some help with extracting .rar files on feisty fawn


29 alex October 15, 2007

Hey thanks!


30 kldfsj November 7, 2007

you can use Winrar with WINE – you can decompress and create archives with
and without password etc. You will get nag screen in 30 days but it will work


31 arif November 18, 2007

apt-get install unrar doesn’t work for debian.

For debian apt-get install unrar-free

Arif Meraj
Unix Administrator


32 Mishu November 24, 2007

Installation For Suse 10 users:

# su
# yast2 -i unrar


33 doctor mapache January 3, 2008

For Ubuntu users (I’m using 7.10) you can find it in the Synaptic package handler

8 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

Sorry for the translation if it is not accurate, I have the menu in Spanish.


34 Azura January 10, 2008

Very helpful. I downloaded the binary package and followed the subsequent

It works on Slackware, Yay! ^__^


35 simo January 25, 2008

Hello when i execute ./rar i got this error

-bash-3.00# ./unrar
./unrar: /lib/tls/ version `GLIBC_2.4′ not found (required by ./unrar)

any body can provid a help ,



36 anand February 1, 2008


I was getting same error.

I installed rar and unrar through rpm and its working fine.
rpm -ivh
rpm -ivh


37 Carmel February 12, 2008

If you are searching for a GUI utility to extract and handle rar files with, there is
PeaZip for Linux which comes handy:

It runs both in Gnome and in KDE and is available as DEB and RPM.


9 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

38 Free Wallpapers February 16, 2008

Great post!

Thank you!


39 Varaonaid February 18, 2008

Carmel…thanks *so* much for the ifno re: peazip. I’m much more comfortable with
a GUI and it was exactly was I was looking for. Worked perfectly! :)


40 MSK February 19, 2008

very useful one..


41 rash March 14, 2008

I downloaded unrar successfully but i get an error when i try to open the file thats
compressed. the error is:
Warning:You need to start extraction from a previous volume to unpack file.wmv
No files to extract


42 rash March 14, 2008

I forgot to mention i a am using sidux [debian] live CD!


43 Questioner March 25, 2008





44 ilke April 10, 2008

thanx Mishu, nice to see Suse has a support here, i searched for long time… i will
give a try tomorrow morning.

10 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

Mishu Says:
November 24th, 2007 at 2:36 am
Installation For Suse 10 users:
# su
# yast2 -i unrar


45 igor May 12, 2008

cd /tmp
tar -zxvf rarlinux-3.6.0.tar.gz
cd rar
cp rar unrar /bin

when i put the last command it says:

cp: cannot create regular file `/bin/rar’: Permission denied
cp: cannot create regular file `/bin/unrar’: Permission denied

what do i do?


46 vivek May 12, 2008


Run last two command as a superuser (root).


47 igor May 12, 2008

vivek sorry i am new to this linux thing would you be able to tell me what exactly
do i tyoe in the terminal? like the last two command you said with superuser but
how do i write that? thank you very much i appreciate it.


48 Vladimir May 13, 2008

run “su -” and enter your root password, then issue your commands and you
should receive no errors


49 charlymanja May 30, 2008

thanks, it really works on fedora 8, keep blogging


11 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

50 Abhishek June 2, 2008



51 vinodh June 10, 2008

thanks a lot


52 Sergey June 13, 2008

# apt-get install unrar

It’s not work :(

Reading package lists… Done

Building dependency tree… Done
Package unrar is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package unrar has no installation candidate

Please, help (((


53 celleke July 10, 2008

Help, all those tools rar, peazip etc are very nice to use. But how can I extract a
spawned rar archive?
Called *.rar, *.001 …


54 CodeLab July 19, 2008

Thanks For The Very Good Description Here

It Worked Perfect For Me.
One Question
How Do I Extract Password Protected Rars
I Mean, I Have The Password, But How Do I Specify It In Command Line.
Need Syntax For That


55 CodeLab July 19, 2008

12 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

Its Called Multi-Part Rars
You Dont Have To Do Anything Different For That
Heres The Ex.
unrar e file.part01.rar

unrar Looks For All The, I Tried And It Worked

file.partxx.rar and Extracts It For You
Hope It Helps


56 vivek July 19, 2008


unrar e -p{password} file.rar

unrar e -pmySecrete demogame.rar


57 bill July 21, 2008

has anyone a solution for that GLIBC problem?

although the exists and has 777 the error appears, complete libc6 is
installed. machine: debian7 minimal from netinst cd. thanks-a-lot!


58 DSpider July 30, 2008

Same problem on Debian Etch…

unrar: /lib/tls/i686/cmov/ version `GLIBC_2.4′ not found (required by


This problem seems to pretty old… Dating back to 2007 (and even older). No-one
came with a solution… I’m starting to think this Linux shit isn’t the OS for me :|
Windows is easyer. So what if 99% of all viruses are made for Windows ? Ignorance
is fucking biss…


59 bill July 31, 2008

Everything is easy as long as you know what you’re doing ;-)

Windows ain’t easy. It’s frightening -> You don’t what what IT does ;-)))


60 S. Nilesh July 31, 2008

13 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

There is something simply called ‘rar’ which uncompress AS WELL AS compress.

That means you can create, read, modify RAR archives. Its free. I don’t know
about its license.


61 bill July 31, 2008

aha, and where to get? googleing for “rar” could be difficult :-D


62 vivek July 31, 2008


Type the following commands as root:

apt-get update
apt-get upgrade
apt-get update unrar
Here is output from my system:
cat /etc/debian_version
If you need further assistance please feel free to use our forum as thread
discussion is supported very well..


63 S. Nilesh July 31, 2008


it is available for Fedora in freshrpms. I don’t about Debian based distros.


64 Vovanuch August 17, 2008

It works, thanks a lot.

Unrar and 7zip too. I install win-made version of 7zip (it was in my win distr’s
collection) under WINE and it works great.


65 shashank September 10, 2008

Its a very informative site and i am glad i was able to sort the some problems i was
facing with the .rar extension.
Thanks a lot

14 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX



66 Panik86 September 19, 2008

i have been haveing trouble unzipping a file, i have tried everything, someone plz
help me, email is
When i try to unzip my rar file directly by right clicking and saying extract here, i
get this /bin/sh: /bin/rar: cannot execute binary file and when i open the terminal
in the same directory this is what it says [root@localhost Panik]# unrar diablo.rar]
bash: /bin/unrar: cannot execute binary file i dunno if im using the wrong
command, i have rtyed alot, but nothing works, btw im using yellowdog 6 and io
have installed unrar.


67 sanzilla October 8, 2008

the APT method is not working under the debain

#apt-get install unrar


68 Karen November 5, 2008

Hi. thanks so much for your resources. I am new to linux, and am trying to move a
joomla .zip file into the var/www/Joomla directory. I use: mv Joomla_1.5.7-Stable- var/www/Joomla but only get:

mv: cannot move `’ to `var/www’: No such file

or directory
What am I doing wrong pleaseÉ thanks


69 harshal November 9, 2008

i am unable to copy ‘rar’ and ‘unrar’ files to “/bin” from “/tmp/rar”.

It says, permission denied.
What to do.?
I have downloaded “UNRAR 3.60 freeware ” in “/tmp”


70 Madhu R December 16, 2008

Thankz Wat i want excatlyyyyyyyyy


15 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

71 SK December 20, 2008

unrar: /lib/tls/ version `GLIBC_2.4′ not found (required by unrar)

can some one help to fix this issue?

i updated glibc


72 Yugi December 23, 2008

Thanks Dear, Working cool


73 Dimitrios January 24, 2009

Thanks! ;)


74 sam February 5, 2009

thank u


75 Smile February 9, 2009

How do I open a binary file using Linux rar – on Redhat or Ubuntu or any linux?

When I try this command,

unrar e install.bin
It throws an error – install.bin is not a rar achieve.
No Files to extract.

So how can I extract a binary file in linux using this unrar ?


76 robert kubatz February 18, 2009

sorrowly i had to use your tool because some idiots
use it.
did you ever here for command line conventions on unix?
stupidy prevails

yours robert


16 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

77 Diabolic Preacher February 26, 2009

I am not finding any reference for unrar syntax on Solaris 10. Should it be the
same as the one for Linux as you described above?


78 rparamo March 18, 2009

Muchas gracias por la contribucion instale con el tar sin problemas.



79 Karanvir March 30, 2009

Open SUSE 11.0 displays error while using this command:-

cp rar unrar /bin

Permission denied

Please help fast.


80 didir April 8, 2009

terima kasih / thank’s


81 Reza May 24, 2009

Hi everyone and thanks for your replys.

I have a question,,
Is it possible to extract rar files in server? (using cpanel or php script)?
I have uploaded a rar file but I understood that my cpanel can’t extract the file
content. How to extract it’s contents? Is it possible to use a php script? how?
If RAR files , was in several parts, then what i can extract it?
If files has password protection, what i do?


82 Daniel July 17, 2009



17 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

83 Lee July 20, 2009

It’s very usefull for me , thank you so much !!!


84 Arif July 28, 2009

Thanks a lot.


85 jeril August 17, 2009

hi.. i get the following while trying to install. what do i do ??

./unrar: error while loading shared libraries: cannot open shared
object file: No such file or directory
I try to edit /etc/ what do i write in this file?. I have
libraries at /usr/lib/ Is there another solution ?


86 fariba August 18, 2009

thanks, it was really helpfull


87 Justin August 28, 2009

in ubuntu sudo apt-get install wine after wine installs, download and install winrar
for windows, works perfectly.


88 sivam September 5, 2009

Used the commands for SUSE LiNUX..

Useful, thanks…


89 mamad October 14, 2009

Thanks sir :)


90 raja November 6, 2009

thanks dude.. such a good post. i am very happy now its working fine for me.

18 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX



91 santhosh.pc November 11, 2009

how to open rar files in mandriva linux


92 Amrit November 25, 2009

thanks a lot……………..


93 shirish December 2, 2009

thank you very much my problem was solved with these commands


94 vijay January 1, 2010

hello can any1 tell me how to download .rar file (audio file). on windows XP.


95 felipe1982 January 5, 2010

WinRar is sh*t! Use all the way!


96 Joosep January 8, 2010

Thank You a lot. That was very helpful.


97 tpatel January 11, 2010

Thanks NixCraft…


98 Help January 17, 2010

i want to unrar a file : 12.rar


99 vamsi January 17, 2010

19 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

Thanks :)
shell script to automate installation


100 Suraj Gupta January 25, 2010

I Want To UnJar Files…


101 prabhakar February 4, 2010

till,i m not able to extract file.what i should do.


102 Tensigh February 9, 2010

Is there a trick to unpacking rar archives that are segmented? I download files
that are filename1.rar filename2.rar and Winrar unpacks them just fine. Linux
doesn’t, and it’s pissing me off!


103 r3d0 March 3, 2010

lately unrar was been faling when it comes to extract..

but i found a solution …
apt-get install unp
unp [FILE].[Any Compress extention]

Easy and very quickly…

unp is a free powerfull extraction package ..
I like use alternatives software… for any question


104 r3d0 March 3, 2010

I forgot to say…
unp extratct rar files divided in parts to, similarly explained above.


105 Tensigh March 3, 2010

Hey r3do, thanks for the tip. Sadly, unp still does the same thing. Looks like it’s
WinRAR to the rescue again. Why doesn’t this work in Linux??? Arrrgghh!!!!

20 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX


106 Mau March 14, 2010

Thanks it worked great! I was going crazy with this installation.


107 tensigh March 14, 2010

I finally got it to work! Success!!

The trick is to stay the he*l away from unrar-free and just use unrar! I’m sure it
will give Richard Stallman nightmares but the unfree version worked (finally!)
This process was much easier with WinRAR and I had success much earlier, but
it’s nice to finally get it to work.

Of course, the idiots who made the spanned archives in the first place should be


108 pradeep March 24, 2010

when i extracting the rar file it is showing that you need to volume to extraction
the file and lso please insert the disk to cotinue the extration . pls help me for this
and the file i am trying to extracting is 90 mb. pls send me some good solution for


109 Akalpita April 6, 2010

Thanks a lot for for useful information and step by step guide.


110 Jack April 20, 2010

Thank you for this post, unrar is working perfectly on my Xubuntu O/S.


111 Mal Coppola April 22, 2010

thanks for this post, i can unRAR stuffs from windows. soon i’ll be ditching
windows for linux!


112 Ankit April 28, 2010

21 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

how to untar openvpn-2.1.1.tar in debian?


113 Tensigh April 28, 2010

Ankit, it should just be tar -xvf openvpn-2.1.1.tar. Does that work?


114 Erok May 11, 2010

If using WinSCP, make sure you set file transfer mode to FTP, not SFTP.


115 Rohini May 27, 2010

thanks for th info


116 thefedorabug May 29, 2010

I am going to use unp anyway

hate using proprietary software


117 DF June 1, 2010

clear and easy…great work


118 linuxnewb June 10, 2010

Thanks for that, you’ve been a real help to me. I’ve just changed to Linux recently
and the lovely bastard made me cry two times. I’m still keeping it, tho:)


119 Farneville June 10, 2010

lols I was looking for rar command not unrar but your site came up of the 1st page
of google. I was wondering if you a have a guide in compressing not
decompressing anyways I’ll just use man rar and check the commands… Cheers


120 Greg Freeman August 11, 2010

22 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

These are great productivity tips, on macosx especially it’s a lot quicker using
these tools instead of unrarx.


121 Juergen August 23, 2010

This was very usefull for me

much thanks


122 mopheat September 2, 2010

graet… my rar file now can be open



123 praveen September 2, 2010

Now im able to open.

Thanks alot :)


124 Rob September 30, 2010

To unpack a single file in a multipart archive:

$ unrar e -kb filename.rar


125 al September 30, 2010

my usb was infected by a virus and all my data are in that.
i try to open it using a win.rar folder and it works for some (not all) of the
documents (word) i had in usb.
but now i want to save them in another file on my pc.
how can i save files form win.rar to a new folder on my pc?
thank u


126 aman October 11, 2010

heloooooo sir i cant understand plz help me how i can extract .rar file in server ??


Leave a Comment

23 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX

Name *

E-mail *


You can use these HTML tags and attributes: <a href="" title=""> <abbr title="">
<acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime="">
<em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail


Tagged as: archive files, archiving, data compression, extract rar files, extract rar linux, files rar, Linux,
linux freebsd, linux rar, linux rar files, linux unrar, rar, rar command, rar file, rar file linux, rar files, rar
files linux, rar linux, UNIX, unix oses, unrar, unrar command, unrar linux, yum

Previous post: Linux or Unix find and remove files with one find command on fly

Next post: What are the exit statuses of ssh command?

Sign up for our daily email newsletter:

Enter your email address Sign Up

24 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX Ads by Google

Find us on Facebook


4,674 people like nixCraft

Rui Andi Roberto Konstantin Mohammed

Алексей Julio Ahmed Radostin Yamini

Facebook social plugin

Related FAQs

Extract tar.gz File

Tar Extract a Single File(s) From a Large Tarball
Howto open .daa files (Direct-Access-Archive) under Linux / UNIX
Linux / UNIX command to open .gz files
Unzip files in particular directory or folder under Linux or UNIX

©2006-2010 nixCraft. All rights reserved. Cannot be reproduced without written

Privacy Policy | Terms of Service | Advertise | Questions or Comments | Sitemap

25 of 25 11/21/2010 01:35 AM