Edit

How to Unrar Files in Linux

Edited byDW and 3 others

Article
Edit
Discuss History

Roshal ARchive (RAR) is a file format designed to compress and archive data. Once you download rar files from the Internet, you need a program that will extract them – unpack or unrar them. Since this program doesn’t come preinstalled in most Linux installations, you need to acquire it elsewhere. This guide explains where to find unrar, and how to use it to unrar files in Linux.

Edit Steps

Install the Unrar Application

  1. 1
    Make sure that your computer is connected to the Internet.

  2. 2
    Open up the Linux shell if you are currently in the Linux GUI.
    • The shell can be opened by using the following key combination: Control + ALT + F1.
    • You can also open a Terminal that acts as a shell from your System Tools folder.
    • All commands listed below can be entered at the command line in the Linux shell or Terminal.
  3. 3
    Use the right command to download unrar into your Linux installation.
    • Users of Debian Linux should type in the following command: “apt-get install unrar” or “apt-get install unrar-free”.
    • If you are using Fedora Core Linux, type in the following command: “yum install unrar”.
    • Users of OpenBSD type in this command: “pkg_add –v –r unrar”.
    • Suse10 users can enter “su” followed by “yast2 –i unrar”.
    • Suse11 users can enter “sudo zypper install unrar”.
  4. 4
    Download the binary package directly from rarlab if the above commands don’t work.
  5. 5
    Locate the rar and unrar commands in the rar directory.
    • Enter “cd rar”.
    • Type “./unrar”.
  6. 6
    Copy the rar and unrar to the /bin directory with the following command: “cp rar unrar /bin”. The unrar command is now available for use in your Linux installation.

Use the Unrar Application

  1. 1
    Dump all files(excluding folders) into the current directory with the command “unrar e file.rar”.

  2. 2
    List the files inside a rar archive with the command “unrar l file.rar”.

  3. 3
    Extract files with the full path with the command “unrar x file.rar”. This is probably what you want.

  4. 4
    Test the integrity of an archive with the command “unrar t file.rar”.

Edit Tips

  • The RAR format supports data compression, error recovery and file spanning (separating a single file into a group of files, to be recombined later).
  • If a RAR file is broken into smaller files, they are named .rar, .r00, .r01 and so on. Point your unrar utility at the .rar file and it will automatically put the pieces back together.
  • RAR3 is the current version of the RAR format. It added the Advanced Encryption Standard with a 128-bit key length. It also supports files larger than 4 Gigabytes and Unicode names.
  • RAR files can only be created through commercial software, but they can be unpacked using the free unrar command line tool in Linux.
  • If you are uncomfortable with the command line and are looking for a GUI RAR interface for your Linux installation, you can try out PeaZip. PeaZip works in Gnome and KDE and is available in DEB or RPM.

Edit Warnings

  • If you receive error messages during the installation of the unrar command, log in as super user by typing “su” and your password. This gives you the appropriate installation permissions.

Edit Related wikiHows

Edit Sources and Citations

Articles for You to Write

Here is a list of suggested articles that have not yet been written. You can help by researching and writing one of these articles. To get started writing one of these articles, click on the red link of a title below.

Article Info

Last edited:
January 19, 2011 by Msifuw

Categories:
Linux

Recent edits by: Chris Hadley, Maluniu, DW (see all)

Article Tools

Share this Article:

Thanks to all authors for creating a page that has been read 56,736 times.

Was this article accurate?

YesNo

Thank the Authors

Give this article a +1


Bored?x

You could...

Fix Some Spelling Errors

We would love to have your help fixing some spelling errors!