Hello, friends, I hope you are doing well today I am going to talk about how you can use 7zip on your Linux distribution. 7-Zip is an archive format that is widely used on Windows and gives a high compression rate.
And the extension is .7z. It is an OpenSource project but does have some functionalities and few parts of code from unRAR. By default, it is not supported by Linux Distribution and when trying to open a 7zip archive on Linux you will be greeted with an error:
Could not open this file type There is no command installed for 7-zip archive files. Do you want to search for a command to open this file?
Don’t worry we can install 7zip on Linux they haven’t forgotten about Linux. It is really simple but if you try to install it using apt-get install command you might get an error saying that there is no package named 7zip in the repository.
The reason being the 7zip package for Linux is named p7zip now we know that what the package name is we can try to install it of your favorite Linux Distro.
Installing 7zip on Linux:
There are a total of three packages starting with p7zip: p7zip, p7zip-full, and p7zip-rar.
The difference between these packages is that p7zip is the lighter version of the software providing support for only .7z whereas p7zip-full provides more support for the 7z compression algorithms.
And the p7zip-rar provides support for the .rar files along with 7z.
If you are just going to be working with the 7z you can simply install p7zip-full but if you want to be able to use rar files too then simply install p7zip-rar alongside it.
If you are on Ubuntu run the following commands.
sudo add-apt-repository universe sudo apt update
After you have updated all your repositories run the following command to install 7Zip.
sudo apt install p7zip-full p7zip-rar
After successfully installing 7zip you can use it to extract and compress file in 7z format.
Also Read: Why I Switched to Parrot OS?
How to Extract 7zip Archive files in Linux
Now that you have installed 7zip you can use either GUI or command line to extract the archive.
In GUI you just have to right click on the archive and click on extract it.
Alternatively, you can also use the command line option:
7z e file.7z
Compress a file in 7zip archive format in Linux
You can compress files into 7zip archive by using the graphical interface. You just have to right click on the folder you want to compress and select Compress.
Or you can use the command line to great the archive.
7z a archivename file_to_compress
The file extension will be selected by default to .7z. You can also specify the file extension (.zip) of the output file.
That’s it as you can see it is quite simple and straight forward how you can install and use 7Zip on your Linux system. If you have any question to use the comment section feel free to leave some suggestions too.