Ubuntu isn’t able to open .rar files by default. In order to unrar, you’ll need to install a small utility. Open a command line terminal and type the following commands to install it:
$ sudo apt update $ sudo apt install unrar
Open rar files
Now that the unrar utility is installed, you can use the following command syntax to extract files from a RAR archive into your current working directory.
you can also specify a different directory after the archive name if you wish to extract the files somewhere else.
$ unrar x files.rar /path/to/dir
If you’d like to see the contents of the RAR archive, without extracting any files, use the l
option.
Specify multiple files to extract, if you’d like.
$ unrar x files.rar file1.txt file2.txt
How can I uncompress a *.7z file in Ubuntu and keep the directory structure?
sudo apt install p7zip-full p7zip-rar
With this, Nautilus should have an option to uncompress 7-Zip Files.
I also recommend p7zip-rar
so it also includes support for RAR files.
This is assuming you want to do it via GUI with Nautilus. If not, after downloading the packages above do the following:
7z x PACKAGE.7z
that should eXtract the packages with full path.