How to Open a RAR File in Linux (Ubuntu/Debian)

Tags:

If you need to uncompress a .rar archive in Linux, you can download a program called unrar. If you are using Ubuntu or Debian, you can install unrar by opening a terminal and typing sudo apt-get install unrar. Then read the instructions by typing man unrar.

[UPDATE: to install unrar in Ubuntu you need the Multiverse Repository enabled.]

Basically, to unrar a file in Linux, just navigate to the directory where your rar archive is and type unrar x [filename.rar], replacing [filename.rar] with the name of your rar archive.

Also check out the great page over at cyberciti.biz on how to install and use rar files on Linux.

Average: 4.4 (192 votes)

Comments

Reading package lists...

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

Webmaster Tips's picture

Multiverse

Sorry, I should have mentioned that you need the Multiverse repository enabled.

Please see this Ubuntu software installation tutorial for information on how to enable the Multiverse repository.

after you install unrar in

after you install unrar in ubuntu. to uncompress a rar file you can also right click on the file and select extract here.

Reading package lists... (success)

fransisco@feisty-fawn:~$ sudo apt-get install unrar
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
unrar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 96.3kB of archives.
After unpacking 233kB of additional disk space will be used.
Get:1 http://kambing.vlsm.org feisty/multiverse unrar 1:3.7.3-1 [96.3kB]
Fetched 96.3kB in 6s (15.3kB/s)
Selecting previously deselected package unrar.
(Reading database ... 172551 files and directories currently installed.)
Unpacking unrar (from .../unrar_1%3a3.7.3-1_i386.deb) ...
Setting up unrar (3.7.3-1) ...
fransisco@feisty-fawn:~$

PS: maybe u need to update list of source.list

Webmaster Tips's picture

Open RAR file Linux

Sorry... I forgot to mention that you need the Multiverse Repository enabled. I mentioned it in a previous comment but I will update the post also.

unrar

I thank you for directing us to unrar. It serves us well, as did you.

Many thanks for the info

Many thanks for the info mate, :)

Alright, I set my repository

Alright, I set my repository to multiversal and I'm still getting the
"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"
message. Is there anything else that could be causing that?

Webmaster Tips's picture

which ubuntu

Do you have both the multiverse and universe repositories enabled? Are you installed with apt-get install at the command line or with Synaptic? Maybe try with Synaptic package manager and see if you get any other information from Synaptic.

this is why Windows users

this is why Windows users stay with Windows, such a ludicrous operation for opening a RAR archive!

Webmaster Tips's picture

Windows vs. Linux

Most Windows users stay with Windows because they don't know any better.

Ever tried to open a PHP file in Windows and have it ask you if you want "the Web service" to find out what kind of file it is? And then have Windows tell you that it can't determine what kind of file a PHP file is? Or Python file, Ruby file, etc.

Ubuntu is easier than Windows in many ways. Getting RAR files opened in Linux is fairly easy.

I'm getting this kind of

I'm getting this kind of error when I try to run unrar from command line.

unrar: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by unrar)

What do I need to do to make it work? And can I use it from GUI?

I'm using Debian Etch and GNOME

Webmaster Tips's picture

glibc_2.4 and unrar

I'm using Ubuntu and I'm not sure about Debian Etch. It looks like there is some information on it here.

Unrar and 7zip too

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.

Unrar

Works with no problems at all..

Thanks :D

Thank you! After I followed

Thank you!
After I followed your instruction, everything just works fine!

Worked fine

After two years this post was aired, I step on it. It was a mess to copy the rar file in a pendrive, jump to my wife's window pc, unpack, resave and then coming back to my ubuntu laptop. Now it's all right click and voilá.

Tnx dude, great job.

That was much better,

That was much better, thanks. I've been reading for more than an hour and nothing was working.

hi

just type sudo apt-get install unrar
enter the password
U r done.

Syndicate content