How do I install 7zip through Terminal to extract rar files?
Asked
Active
Viewed 3.7e+01k times
3 Answers
122
I don't know why would you like specifically 7-zip's binary to extract RAR, but here we go:
To unrar files with... unrar:
sudo apt-get install unrar-free
unrar e some.rar
To extract rar files with 7-zip:
sudo apt-get install p7zip-full
7z x some.rar
e and x mean extract obviously.
-
instead of using zip, tar, unrar, etc. we could use the same tool (7z) with the same interface for all of them – qwr Sep 10 '19 at 21:33
31
You may use p7zip. And you can install p7Zip using command : sudo apt-get install p7zip.
To extract RAR archives, you'll need to install package "p7zip-rar", too.
Install it using : sudo apt-get install p7zip-rar
Or you can get it done in single command : sudo apt-get install p7zip p7zip-rar
Read p7zip manual for more information: man p7zip
Pratik Patel
- 508
- 3
- 6
-
Post-bounty note: This was the only answer that correctly mentioned the required package for 7zip to be able to extract rar files. `p7zip-rar` depends on `p7zip-full`, but the reverse is *not* true as assumed by other answers when bounty was started. – Nov 14 '19 at 12:05
2
Use the following command to Install 7Zip:
$ sudo apt-get install p7zip-full
Extract files using 7zip:
$ 7z e example.zip
(Or use the x option instead of e to preserve file paths).
Compress files using 7zip:
$ 7z a compress.zip
For more information, visit the reference
mydoghasworms
- 1,019
- 4
- 11
- 26
Razor Rassh
- 487
- 1
- 3
- 13
-
I didn't come right with the accepted answer. This worked spot-on. – mydoghasworms Jun 04 '20 at 12:01