Since Ubuntu switched to Gnome 3 Desktop, the default Nautilus file browser does not support compressing files into rar archive even after installed rar and unrar packages.
For those who want to create RAR archive and add password protect, this quick tutorial may help.
Install rar and unrar packages to get RAR support
First of all, you need to open terminal (Ctrl+Alt+T) from application menu, and run command to add RAR support:
sudo apt install rar unrar
Type your user password (no asterisks feedback) when it prompts and hit Enter to continue.
Once installed, you’re able to decompress RAR archive in Nautilus after running nautilus -q command or reboot.
How to Create RAR file archive:
1. Search for and open File Roller from Gnome applications menu:
2. When it opens, click New Archive… from app menu. In pop up dialog, do:
- Select file type .rar and type in a name.
- Select where to store the rar archive.
- Add password protect (optional)
3. The previous step create an empty archive, you need to do more:
- Click ‘+‘ icon and choose files/folders you want to include in the rar.
- And finally click ‘Save as‘ to apply changes.
That’s it. Enjoy!