How to UnRAR files in Linux Command Line
- Added new sections in Server project. Also edited the wording so that voice is mostly first-person.
- Added new entries to Imbentori project.
- Edited this site’s footer. Notably, I changed from 512KB Club to the leaner 250KB Club.
- Edited some lines in Always Carry project.
Recently, I had to download some file from the internet.
But said file is compressed into .rar
.
According to the Debian packages, sudo apt install unrar
won’t work anymore because it “is missing, has been obsoleted, or is only available from another source.”
I don’t deal with that.
So here’s my workaround. The following assumes you1 have a Debian-like Linux 64-bit distro, and are comfortable with the terminal.
My UnRAR Workaround
- Get RAR archiver from RARLAB Archiver.
You can either:
- Go their website, and click on the link that matches your system; or
- Enter in the terminal:
Note that at the time of writing, the current version iscurl -LO https://www.rarlab.com/rar/rarlinux-x64-6.0.1.tar.gz
6.0.1
. Be sure to check the site for latest updates. - Go to the folder where it got downloaded to.
Use
tar
to extract the filestar -xvzf rarlinux-x64-6.0.1.tar.gz
-x
option means extracts the file/s from tar
-v
option means verbose, to see the extraction progress
-z
option decompresses all the files within, if any
-f
option indicates the filename you’ll work on - Go into the extracted folder.
It should have a
Makefile
,rar
andunrar
executables, among other files. Runmake
like so:This will copy the executables to thecd rar/ sudo make
/usr/local/bin
and is now available to the user (you!). - Time to extract the
.rar
file you got there:unrar e legallyDownloadedFile.rar
e
option means extract.
That’s it.
-
I’m actually talking to my future self. This is my notes. ↩︎