Xarchiver the default archive management tool that comes with Debian Stretch won’t open .RAR files as it is a proprietary file format.
(An earlier article described how to enable installing non-free software in Debian).
So, here is how to extract such archives :
First install a tool : unrar-free from the Terminal :
sudo apt install unrar-free
Once installed, specify the name of RAR archive that needs to be extracted :
unrar-free filename.rar
This will extract the contents in the current directory. To extract it to a different location, add the destination path next to the archive name :
unrar-free filename.rar destinationpath
To view the contents of RAR archives before extracting, use the -t parameter :
unrar-free -t filename.rar
The usage of unrar-free is simple and can be viewed using man pages :
man unrar-free
All done.