How to Install and Use UNRAR on Ubuntu 20.04 | 22.04 LTS

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

In this guide, we will show you how to install and use UNRAR on Ubuntu systems.

UnRAR is the name of two different command-line applications for extracting RAR file archives.

RAR is a proprietary archive file format that supports data compression, error correction and file spanning. It was developed in 1993 by Russian software engineer Eugene Roshal and the software is licensed by win.rar GmbH. The name RAR stands for Roshal Archive.

Install UNRAR on Ubuntu-APT method

Follow the steps below to get started with UNRAR :

  • Update your Ubuntu system packages with running the below command:
sudo apt update -y && sudo apt upgrade -y
  • UNRAR package is not available on Ubuntu base repository. So You can install it directly via the apt command below:
sudo apt install unrar-free -y
  • Check the version installed as shown below.
unrar --version

Use UNRAR on Ubuntu

  • You can etract or open a RAR file in a current directory, use the unrar -x command. which -x refers to –extract
unrar -x [file-name.rar]
  • To extract or open a RAR file to a specific destination directory.
unrar -x [file-name.rar]  /path/you/want/to/extract/to/

  • To extract a RAR archive and only pull the new files.
unrar --extract-newer [filename.rar]
  • To extract a RAR file and overwrite any existing files with the same filenames, use -f flag as follows which refers to –force
unrar -f [filename.rar]

  • To extract a password-protected RAR file.
unrar -p [filename.rar]
  • List the files in a RAR file.
unrar -t  [filename.rar]

How to Remove (Uninstall) UNRAR

  • Remove UNRAR APT Method
sudo apt autoremove unrar-free --purge -y

Install UNRAR -Conclusion

That’s it

Thanks.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
MQ-Jr
MQ-Jr
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook