Before we discuss how to install unrar on ubuntu 22.04, let's first understand-What is UNRAR?
UNRAR is a command-line utility for extracting RAR archives. RAR files are a popular compression format used to store multiple files in a single archive. UNRAR allows Ubuntu 22.04 users to extract files from RAR archives effortlessly.
This tutorial will explain how to install UNRAR on Ubuntu 22.04.
- RAR Archive Support: UNRAR enables Ubuntu 22.04 users to extract files from RAR archives, allowing access to the content stored in these files.
- Wide Compatibility: UNRAR is compatible with various versions of RAR archives, ensuring that you can extract files from both older and newer RAR files.
- Command-Line Interface: UNRAR's command-line interface makes it easy to use in scripting or automation tasks, allowing you to extract files programmatically.
- Efficient Extraction: UNRAR's extraction process is fast and efficient, ensuring that you can extract files from RAR archives quickly without consuming excessive system resources.
- Stability and Reliability: UNRAR is a stable and reliable utility that has been widely used for many years, guaranteeing a dependable extraction experience.
Steps for UNRAR installation on Ubuntu 22.04
Step 1. Check whether UNRAR is installed or not
There is a possibility that unrar can be already installed on your Ubuntu system, but you are unaware of it.
So we have to check if this tool already exists using the following command:
If the tool is already present in the system then it will provide you the details of its installed version, whereas if it's not installed then it will display a message stating that "command unrar not found".
Step 2. Update your package and Install UNRAR
To update using the apt package, run the following command:
sudo apt update
Now, run the installation command:
sudo apt install unrar
Press 'Y' to give you permission to install it, and then press the Enter key.
After the installation is finished, you can use the following to verify that the unrar version is present on your Linux system:
Step 3. Commands to use with Unrar
Following are the list of commands that can be used to extract, decompress or manage RAR-based archives.
sudo apt install rar to install the "rar" utility.
1. Use UNRAR to extract files without archived paths.
If you want to extract all files from the RAR archive into the current directory. Then the command will be:
unrar e sample-1.rar
The “e” option stands for “extract”.
2. Extract with full path
To extracts all files and directories from the RAR archive while preserving the original directory structure, run the following command:
unrar x sample-1.rar
"Extract with full path," denoted by the "x" option, will be employed.
3. Password Protected RAR files
If your RAR file is password-protected, you can extract it by using the regular x option along with the -p switch:
unrar x p sample-1.rar
4. List of the files inside a RAR archive
Shows a list of the RAR archive's files without actually extracting them. The “l” option stands for “list”.
unrar l sample-1.rar
5. Display detailed files info present inside the RAR archive
To display detailed files information, run the following command:
unrar v sample-1.rar
The “v” option stands for “verbose”.
6. Verifies that the RAR archive is intact.
To perform an integrity test before exacting a file using Unrar command for checking any errors or corruption, we can use the option “t” option that stands for “test”.
unrar t sample-1.rar
For whatever reason, do the following to delete the tiny UNRAR utility from your Ubuntu 22.04 or 20.04 Linux system:
sudo apt remove unrar
FAQs to Install Unrar on Ubuntu 22.04
How do I extract a RAR file using UNRAR?
To extract a RAR file, use the following command in the terminal:
unrar x <path_to_rar_file>. Replace
<path_to_rar_file> with the actual path to your RAR file.
Can I extract password-protected RAR files using UNRAR?
Yes, you can extract password-protected RAR files with UNRAR. You will be prompted to enter the password during the extraction process.
Can UNRAR create RAR archives?
No, UNRAR is only capable of extracting files from RAR archives. If you need to create RAR archives, you can use other tools like WinRAR or RAR for Linux.
Are there any graphical user interface (GUI) alternatives to UNRAR on Ubuntu?
Yes, Ubuntu offers various GUI-based file archive managers like File Roller, Ark, or Xarchiver that can handle RAR files in addition to other archive formats.
Can I extract files from split RAR archives using UNRAR?
Yes, UNRAR can handle split RAR archives (.rar, .r00, .r01, etc.). Simply provide the path to the first part of the split archive during the extraction.
Can UNRAR extract files with non-English characters in the file names?
Yes, UNRAR supports extracting files with non-English characters or filenames encoded in different character sets.
Does UNRAR support RAR archives encrypted with AES-256?
Yes, UNRAR supports extracting files from RAR archives encrypted with AES-256 encryption. You will be prompted to enter the password during extraction.
We have covered various steps on how to install unrar on ubuntu 22.04 in this tutorial.
If you have any queries, feel free to ask them in the comments section, and we would be happy to respond to them....