The “.rar” extension is a native format of the famous WinRar. Linux offers to install this extension, which is included in its repository.
Open the terminal and run the following command:
# apt-get install unrar
If the installation was successful, you can now extract a “.rar” file.
To extract from a “.rar” file, just run the command:
# unrar and file.rar
If you want to list what’s inside the “.rar” file:
# unrar l file.rar
To compress one or several files in “.rar” format:
# rar a masterdaweb.rar masterdaweb.txt
or
# rar a masterdaweb.rar masterdaweb-1.txt masterdaweb-2.txt