How to install rar and unrar in CentOS 7 VPS

Linux Web Tutorials

May 1, 2020 by Harry

How to install rar and unrar in CentOS 7 VPS

RAR files are archived by Winrar compression software and can be split into large files. In this tutorial, we are going to explain how to install rar and unrar on Linux CentOS 7.

Install rar

First, download the rar package with the wget command.

# wget

Output sample:

[[email protected] ~]# wget
--2019-08-03 07:58:21--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 546592 (534K) [application/x-gzip]
Saving to: ‘rarlinux-x64-5.7.1.tar.gz’
100%[=======================================================================================================================================>] 546,592 651KB/s in 0.8s
2019-08-03 07:58:22 (651 KB/s) - ‘rarlinux-x64-5.7.1.tar.gz’ saved [546592/546592]
[[email protected] ~]#

Extract the downloaded file using the tar command.

# tar -xzvf rarlinux-x64-5.7.1.tar.gz

Output sample:

[[email protected] ~]# tar -xzvf rarlinux-x64-5.7.1.tar.gz
[[email protected] ~]#

Log in to the tar directory using the cd command.

[[email protected] ~]# cd rar
[[email protected] rar]# ls
acknow.txt  default.sfx  license.txt  makefile  order.htm  rar  rarfiles.lst  rar.txt  readme.txt  unrar  whatsnew.txt
[[email protected] rar]#

Set the environment variables by copying the rar and unrar files to /usr/local/bin/.

Install rar

[[email protected] ~]# cp -v rar unrar /usr/local/bin/
‘rar’ -> ‘/usr/local/bin/rar’
‘unrar’ -> ‘/usr/local/bin/unrar’
[[email protected] ~]#

You can run these commands in your terminal to confirm the functionality of the rar and unrar application.

[[email protected] ~]# rar

RAR 5.71   Copyright (c) 1993-2019 Alexander Roshal   28 Apr 2019
Trial version             Type 'rar -?' for help

Usage:     rar <command> -<switch 1> -<switch N> <archive> <files...>
               <@listfiles...> <path_to_extract\>

  a             Add files to archive
  c             Add archive comment
  ch            Change archive parameters
  cw            Write archive comment to file
  d             Delete files from archive
  e             Extract files without archived paths

It is finished. As a result, this way you can install rar and unrar on your CentOS Linux VPS server. Good luck.


About the Author Harry

I like to learn and to teach to make things easier

Leave a Reply

Your email address will not be published. Required fields are marked *