X
wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 17 people, some anonymous, worked to edit and improve it over time.
This article has been viewed 742,673 times.
Learn more...
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 pre-installed 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.
Steps
Method 1
Method 1 of 2:
Installing the Unrar Application
-
1Make sure that your computer is connected to the Internet.
-
2Open 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.
Advertisement -
3Use the right command to download unrar into your Linux installation. The following commands require root privileges, so you should be logging in using su (or sudo). Type in your login and password to log as root.
- 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”.
- Arch Linux users should install from extra repository using "pacman -S unrar".
- Users of OpenBSD type in this command: “pkg_add –v –r unrar”.
- Suse10 users can enter “yast2 –i unrar”.
- Suse11 users can enter “zipper install unrar”.
-
4Download the binary package directly from rarlab if the above commands don’t work.
- Type “cd /tmp”.
- Type “wget http://www.rarlab.com/rar/rarlinux-3.9.1.tar.gz ”.
- Unrar the file with the following command: “tar -zxvf rarlinux-3.9.1.tar.gz”.
-
5Locate the rar and unrar commands in the rar directory.
- Enter “cd rar”.
- Type “./unrar”.
-
6Copy the rar and unrar to the /usr/local/bin directory with the following command: “cp rar unrar /usr/local/bin”. The unrar command is now available for use in your Linux installation.
Advertisement
Method 2
Method 2 of 2:
Using the Unrar Application
-
1Extract files with the full path with the command “unrar x file.rar”. This is probably what you want.
-
2Dump all files(excluding folders) into the current directory with the command “unrar e file.rar”.
-
3List the files inside a rar archive with the command “unrar l file.rar”.
-
4Test the integrity of an archive with the command “unrar t file.rar”.
Advertisement
Warnings
- If you receive error messages during the installation of the unrar command, log in as super user by typing “sudo -s” and your password. This gives you the appropriate installation permissions.⧼thumbs_response⧽
Advertisement
About This Article
Advertisement