In this tutorial, we will show you how to install and configuration of Rar/Unrar packages on your Ubuntu. For those of you who didn’t know, RAR is the most popular tool for creating and extracting compressed archive (.rar) files, but unfortunately, the Rar tool doesn’t pre-installed under Linux systems, we need to install it using third-party tools to open, extract, uncompress or unrar 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. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Rar/Unrar on Ubuntu systems.
- A server running one of the following operating systems: Ubuntu 20.04, 18.04, and any other Debian-based distribution like Linux Mint or elementary OS.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Rar/Unrar Packages on Ubuntu
Step 1. First, enable multiverse repositories.
Step 2. Install Rar/Unrar Packages on Ubuntu.
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 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
Congratulations! You have successfully installed rar or unrar. Thanks for using this tutorial for installing rar or unrar in the Ubuntu system. For additional help or useful information, we recommend you to check the official rar website