About
Blog
Forum
Low graphics
Shell Scripts
RSS/Feed
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)
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
1 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
If any of above, methods is not working for you, download binary package from official
rarlab site:
$ cd /tmp
$ wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
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
unrar command supports various options below are common options that you need to
use everyday.
$ unrar e file.rar
Please note that replace file.rar filename with your actual filename.
$ unrar l file.rar
$ unrar x file.rar
Email
Training.com Ads by Google
PDF
Print
2 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
On my Redhat FC4… says there is no unrar or rar… does this package go under a
different name?
Reply
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:
[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
Install unrar:
yum install unrar
3 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Reply
Reply
Joe,
Reply
Reply
Reply
Reply
Eliade,
4 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
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
http://www.infor.kanazawa-it.ac.jp/~ishii/lhaunix/
Reply
Reply
Reply
Reply
how do i fix this? can someone perhaps kindly point me to another article or some
instructions? thank you!
Reply
Daniel,
What distro you are using? You need to have updated version of GLIBC.
Reply
5 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Reply
•wget http://dag.wieers.com/packages/unrar/unrar-3.6.2-1.el4.rf.i386.rpm
•rpm -Uvh unrar-3.6.2-1.el4.rf.i386.rpm
•unrar e rarfile.rar
Cheers,
Richard
Reply
Reply
Reply
Thanks!
Reply
Reply
6 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
cd /tmp
wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
tar -zxvf rarlinux-3.6.0.tar.gz
cd rar
cp rar unrar /bin
Reply
Reply
Reply
Thanks
Reply
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.
Reply
Reply
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 http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Reply
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.
Reply
Reply
Hey thanks!
Reply
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
further
Reply
Enjoy
Arif Meraj
Unix Administrator
Therapbd
Reply
Reply
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 http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
menu.
Sorry for the translation if it is not accurate, I have the menu in Spanish.
Reply
Very helpful. I downloaded the binary package and followed the subsequent
commands…
Reply
-bash-3.00# ./unrar
./unrar: /lib/tls/libc.so.6: version `GLIBC_2.4′ not found (required by ./unrar)
-bash-3.00#
Thanks
Reply
Hi,
I installed rar and unrar through rpm and its working fine.
rpm -ivh ftp://ftp.univie.ac.at/systems/linux/dag/redhat/el3/en/i386/dag/RPMS/unrar-
3.6.2-1.el3.rf.i386.rpm
rpm -ivh ftp://ftp.univie.ac.at/systems/linux/dag/redhat/el3/en/i386/dag/RPMS/unrar-
3.6.2-1.el3.rf.i386.rpm
Reply
If you are searching for a GUI utility to extract and handle rar files with, there is
PeaZip for Linux which comes handy:
http://peazip.sourceforge.net/
It runs both in Gnome and in KDE and is available as DEB and RPM.
Reply
9 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Great post!
Thank you!
Reply
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! :)
Reply
Reply
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
Reply
Reply
How?
file.001
file.002
…
file.par2
Possible?
Reply
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 http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Mishu Says:
November 24th, 2007 at 2:36 am
Installation For Suse 10 users:
# su
# yast2 -i unrar
Reply
cd /tmp
wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
tar -zxvf rarlinux-3.6.0.tar.gz
cd rar
cp rar unrar /bin
what do i do?
Reply
igor,
Reply
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.
Reply
run “su -” and enter your root password, then issue your commands and you
should receive no errors
Reply
Reply
11 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Thanks!;)
Reply
thanks a lot
Reply
Reply
Help, all those tools rar, peazip etc are very nice to use. But how can I extract a
spawned rar archive?
Called *.rar, *.001 …
Thanks
Reply
Reply
12 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
@celleke
Its Called Multi-Part Rars
You Dont Have To Do Anything Different For That
Heres The Ex.
unrar e file.part01.rar
Reply
Try
Reply
Reply
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…
Reply
Reply
13 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Reply
aha, and where to get? googleing for “rar” could be difficult :-D
Reply
Bill,
Reply
Bill,
Reply
Reply
Hey!
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 http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Lambofgod
Reply
i have been haveing trouble unzipping a file, i have tried everything, someone plz
help me, email is motterboy20@yahoo.com
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.
Reply
Reply
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-
Full_Package.zip var/www/Joomla but only get:
Reply
Reply
Reply
15 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
i updated glibc
Reply
Reply
Thanks! ;)
Reply
thank u
Reply
How do I open a binary file using Linux rar – on Redhat or Ubuntu or any linux?
Reply
hi,
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
Reply
16 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
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?
Reply
Saludos
Reply
Error:-
Permission denied
Reply
Reply
Reply
thanks.
Reply
17 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Reply
Thanks a lot.
Reply
Reply
Reply
in ubuntu sudo apt-get install wine after wine installs, download and install winrar
for windows, works perfectly.
Reply
Reply
Thanks sir :)
Reply
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 http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Rajas
Reply
Reply
thanks a lot……………..
Reply
thank you very much my problem was solved with these commands
Reply
hello can any1 tell me how to download .rar file (audio file). on windows XP.
Reply
Reply
Reply
Thanks NixCraft…
Reply
Reply
19 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Thanks :)
shell script to automate installation
http://nixcraft.com/shell-scripting/14153-shell-script-will-install-
rar-linux.html#post23210
Reply
Reply
Reply
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!
Reply
Reply
I forgot to say…
unp extratct rar files divided in parts to, similarly explained above.
Reply
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 http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Reply
Reply
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
shot!
Reply
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
proble
and the file i am trying to extracting is 90 mb. pls send me some good solution for
that.
Reply
Thanks a lot for for useful information and step by step guide.
Reply
Thank you for this post, unrar is working perfectly on my Xubuntu O/S.
Reply
thanks for this post, i can unRAR stuffs from windows. soon i’ll be ditching
windows for linux!
Reply
21 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Reply
Reply
If using WinSCP, make sure you set file transfer mode to FTP, not SFTP.
Reply
hi…
thanks for th info
Reply
Reply
Reply
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:)
Reply
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
Reply
22 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
These are great productivity tips, on macosx especially it’s a lot quicker using
these tools instead of unrarx.
Reply
Reply
Reply
Reply
Reply
hi,
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
Reply
heloooooo sir i cant understand plz help me how i can extract .rar file in server ??
Reply
Leave a Comment
23 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Name *
E-mail *
Website
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>
Submit
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
24 of 25 11/21/2010 01:35 AM
Open rar file or Extract rar files under Linux or UNIX http://www.cyberciti.biz/faq/open-rar-file-or-extrac...
Search
Find us on Facebook
nixCraft
Like
Related FAQs
25 of 25 11/21/2010 01:35 AM