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.
In this tutorial we will learn how to install and configuration of Rar/Unrar on your Ubuntu.
Install Rar/Unrar Packages on Ubuntu
Step 1. First, enable multiverse repositories.
sudo software-properties-gtk
Step 2. Installing rar and unrar packages.
Run the following command in terminal and type the password for the user, when prompted.
sudo apt-get update sudo apt-get install rar unrar
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
Congratulation’s! You have successfully installed rar/unrar.
You Might Also Like: Click here to learn How To Install Rar/Unrar Packages on CentOS