How to Extract 7z package in CentOS/RHEL/Fedora?

Updated on September 27, 2017

Are you stuck in extracting .7z file in Linux? Then here’s how you can install 7z extractor in CentOS, RHEL and Fedora based machines. 7z files are generally smaller in size (as it creates a file with a very high compression ratio) and supports only limited compression methods. It supports encryption and preprocessing algorithms and .7z files cannot be extracted using commands such as tar or zip or xz. The command 7za is not installed by default in any of the popular Linux flavors, but you can quickly download and install it from 7-zip.org. This tutorial will tell you how to install 7-zip file archiver in Linux using YUM.

Use tar to extract xz files

Do you know tar command can be used to extract .xz packages?

Prerequisites:

You need to have root privileges to install 7-zip file archiver.

extract .7z files linux

Step 1: Download and setup RPM repo that contains 7-zip package.

# wget ftp://195.220.108.108/linux/dag/redhat/el7/en/x86_64/dag/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
# rpm -ivh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

Step 2: Install p7zip

# yum install p7zip

That’s it! You can now unzip or extract any package that’s compressed using 7-zip archiver.

# 7za x linuximage-amd64.7z

Liked it?

Guess Game:

Then let’s play a guess game! Just ask your friend how to extract .xz file in Linux?

Was this article helpful?

Related Articles

Comments Leave a Comment

Leave a Comment