Install UnRAR & Extract Archives on Arch Linux

UNRAR Arch Linux Logo

UnRAR is an open source Linux port of WinRAR. It is one of the most popular extraction tools and is a requirement to install NZBGet on Arch Linux among many others. UnRAR can also be used to manually unpack archives. This is particularly functional on headless systems as extracting from a client over the network is very inefficient and slow.


Install UnRAR

Install unrar with pacman.

sudo pacman -S unrar


View Archive Contents

List archive contents.

unrar l file.rar

To list contents verbosely replace l with v.


Test Archives

Test the archives with unrar.

unrar t file.rar


Extract Archives

Unpack the archive contents.

unrar x file.rar

Option e specifies that the contents of the archive should be extracted to the current directory. To extract archived files to a specified location use the x switch instead. With the latter also append the destination directory path to the end of the command.


UnRAR Switches

There are several useful options that can be specified along with any unrar command. Unlike most other command line tools all switches have to be specified with a space in between and it’s own dash in front.


To keep broken files use -kb switch. This is useful when wanting to finish downloading incomplete files via alternate methods such as P2P.


To overwrite existing files use -o+ switch or -0- to do the opposite without being prompted.


For password protected files use -p switch followed by the password immediately after without a space. Omitting this switch will cause a prompt for password protected archives. Prevent password prompting by using -p- switch.


To recursively extract archives in subdirectories use -r switch. All queries can also be given an answer of Yes automatically with -y switch.


UnRAR Manual

No official manual is available. A basic list of options and switches is however available. Simply run unrar without any options or switches.