I just realized I can't unrar .rar files on my Ubuntu machine!
What's the easiest way to accomplish this fundamental task? If possible I'd love something like 7Zip that I can just right Click, and extract and have the program worry about how to do it regardless if it's a .zip, a .rar or a .foo compressed file.
Ubuntu by default uses File Roller, which supports the following formats:
Keep in mind, that this is just graphical front-end, so you still need to install
unrar
for.rar
support;The
unrar
package is hosted on the Multiverse repository, so first you'll need to enable the Multiverse repository in Software & Updates;Then you can install the package either by using Software Centre or by opening Terminal and running
sudo apt-get install unrar
.First, run:
You could read
man unrar
.From terminal you can use next command:
Or, the following command if you want to preserve the directory structure too:
Install unrar from the Software Center or by running the command
If you like then you can also use p7zip-full package. You can install it as:
The main purpose of this package is to provide 7z and 7za file archivers with high compression ratio.
I tried the above command on Ubuntu 16.04, but it didn't work.
The following command worked fine for me:
The half-GUI method:
Then, in your favorite file manager (ex: nemo, my favorite, or nautilus [Ubuntu's default]), right-click the .rar file and go to Extract Here. Done!
Here are some free alternatives to the non-free unrar package:
The libarchive-tools package provides the
bsdtar
command that can extract many file formats, including RAR files. To install:Extract RAR files using:
The unar package provides the
unar
command for extracting a variety of file formats, including RAR files. To install:Extract RAR files using:
Another free alternative is the unrar-free package. However,
unrar-free
is only able to extract RAR files, unlikebsdtar
andunar
which are able to extract many file formats. Furthermore, starting in Ubuntu 22.04 (Jammy Jellyfish),unrar-free
is just a wrapper around libarchive (just likebsdtar
), which makesunrar-free
redundant.