On a standard installation, Ubuntu 16.04 does not come with the ability to open or extract RAR file. We need additional package to be installed in order to be able to open or extract any .rar files. But don’t worry, its pretty easy to install the package. All you need to do install install rar package
sudo apt-get install rar
dhani@dhani-ubuntu:~/Python$ sudo apt-get install rar
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
Use ‘sudo apt autoremove’ to remove them.
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 587 kB of archives.
After this operation, 1.657 kB of additional disk space will be used.
Get:1 http://id.archive.ubuntu.com/ubuntu xenial/multiverse amd64 rar amd64 2:5.3.b2-1 [587 kB]
Fetched 587 kB in 4s (142 kB/s)
Selecting previously unselected package rar.
(Reading database … 240334 files and directories currently installed.)
Preparing to unpack …/rar_2%3a5.3.b2-1_amd64.deb …
Unpacking rar (2:5.3.b2-1) …
Processing triggers for man-db (2.7.5-1) …
Setting up rar (2:5.3.b2-1) …
Done. Now you can open rar file, extract it using context menu or right click on a rar file.