How does unzip RAR on Linux? As everyone will know, RAR stands for Roshal Archive and it is a proprietary format with a lossless compression algorithm. In Windows you can find WinRAR, among others, that can compress and decompress parquets of this type. Although RAR is slower than ZIP, it has a higher compression rate and better data redundancy.
Normally in Linux we are used to using tarballs (tar.gz, tar.bz2, ...) with very varied compression algorithms. But as you know, WinRAR is not available for Linux, although as we are going to teach you, you can use RAR compressors / decompressors on Linux without having to go to Wine or anything like that.
Install RAR compressor on Linux
To install it on Debian-derived distributions, you can do the following:
sudo apt-get install rar
And if you are in any other distribution, you can type the following, once download the package, you go with "cd" from the terminal to the directory where it is and type:
gzip -dc rarlinux-X.X.X.tar.gz | tar -xvf - cd rar make install cd .. rm -R rar
And once installed, I also recommend that install unrar (if you don't already have it). For this you can use "sudo apt-get install unrar" or from a package according to your distro. And we can already use it from the command line. I advise you to see the man pages of this tool, although the basic use is simple.
How to compress RAR on Linux
To compress a file or all of a folder:
rar a nombre_fichero_comprimido.rar nombre_fichero_a_comprimir rar a nombre_fichero_comprimido.rar *
How to unzip RAR on Linux
Y for decompress in the same directory or in a different one:
unrar x nombre_del_rar.rar unrar x nombre_del_rar.rar /ruta/destino/descomprimido
But if you want to have one Graphic interface To make your work much easier, install File Roller or GNOMERAR if you have a GNOME desktop or Ark if you use KDE. You can consult the software center of your distro to install them ...
If you want to know more about how install programs on Linux, click on the link that we just left you and you will see how any type of package is installed.