In this tutorial we will show you how to install and configuration of Rar/Unrar on your Ubuntu. For those of you who didn’t know, RAR is most popular tool for creating and extracting compressed archive (.rar) files, but unfortunately rar tool doesn’t pre-installed under Linux systems, we need to install it using third-party tools to open, extract, uncompress or unrar a archive files.
By default the rar and the unrar packages do not come pre-installed in the Ubuntu operating system. This means you cannot create a rar archive or unrar an existing one! It is pretty simple to install them. You need to enable multiverse repositories to install rar. There’s also a separate package called unrar. This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS.
Install Rar/Unrar Packages on Ubuntu
Step 1. First, enable multiverse repositories.
Run the following command in terminal and type the password for the user, when prompted.
Commands for Rar/Unrar archive
Following are the some useful and helpful rar/unrar archive commands:
# unrar x (file_name).rar extract with full path
# unrar e -kb (file_name).rar (Keep broken)
# unrar l (file_name).rar list files inside
# unrar e (file_name).rar dump files excluding folders
# rar a (file_name).rar (file_name) create a archive Rar file
# rar r (file_name).rar recover or fix a archive file or files
# rar a -p (file_name).rar create a archive Rar file with password