How to Install 7-Zip on Debian 12

Choose a different version or distribution

Introduction

Before we begin talking about how to install 7-Zip on Debian 12, let's briefly understand – What is 7-Zip?

7-ZIP is a popular and free file compression software that enables users to reduce the size of large files and folders. This lightweight tool supports a wide range of file formats, making it convenient for various purposes.

With its high compression ratio and fast extraction speed, 7-ZIP ensures efficient file archiving and sharing. Whether you want to compress documents, images, or videos, this user-friendly program is a valuable tool for saving storage space and transferring files easily.

In this tutorial, you will install 7-Zip on Debian 12. We will also address a few FAQs on how to install 7-Zip on Debian 12.

Advantages of 7-Zip

  1. Efficient Compression: 7-Zip provides high file compression ratios, allowing users to significantly reduce file sizes and save storage space.
  2. Wide Format Support: It supports various file formats, including ZIP, RAR, and ISO, making it versatile for both archiving and extracting files.
  3. Free and Open Source: 7-Zip is free to use and is an open-source software, providing access to its code for customization and transparency.
  4. Fast Extraction Speed: The software extracts files quickly, enabling users to access their compressed files without delay.
  5. User-Friendly Interface: With its simple and intuitive interface, 7-Zip makes it easy for users to compress, extract, and manage their files.

Step 1: Update Debian Before 7-Zip Installation

Make sure all of your system packages are up-to-date before installing 7-Zip to prevent any potential problems.

sudo apt update

If there are any updates available, use the command provided to begin the upgrade process.

sudo apt upgrade

Step 2: Install 7-Zip on Debian 12

Installing 7-Zip on Debian Linux primarily involves downloading the 7-Zip binary. To do this, go to the official 7-Zip website, choose the version and architecture of the binary that works best for your system, and save it to your computer. After the download is finished, you must relocate the binary file to the proper location on your computer so that it can be run.

Now, this tutorial will walk you through the process of using the 64-bit Linux x86-64 architecture and the most recent version of 7-Zip, version 22.01 (2022-07-15).

Using the wget command below, download 7-Zip.

wget https://www.7-zip.org/a/7z2201-linux-x64.tar.xz

Please keep in mind that the command above is an example, and that the specific version and architecture of 7-Zip that you download will depend on the specs of your computer. There are various 7-Zip versions available for various architectures.

The installation process of 7-Zip on Debian 12

After the download is finished, open the archive and extract. To open the downloaded tar file, use the following command.

tar xf 7z2201-linux-x64.tar.xz

Once the tar file has been extracted, locate the 7-Zip binary, 7zz. You can now use the following command to launch 7-zip on Linux.

./7zz

When utilizing 7zip from an alternate working directory, the complete path to the binary needs to be supplied. You can add the binary to the /usr/local/bin directory, which will make it available to the entire system, to get around this problem.

mv 7zz /usr/local/bin

You can now use the 7zz command to access 7-Zip from anywhere on your filesystem by adding the binary to the /usr/local/bin directory.

Additional: Basic Usage of 7-zip Commands on Debian 12

💡
The commands below differ from the free, open-source 7-Zip version found in Debian's default repository. If you are looking for instructions in the future, do not attempt to mix and match the commands.

After installing 7-zip on your Debian Linux system, you can use the command line to create and extract archives. Here are five common tasks that you can accomplish with 7-Zip.

Compressing a file:

You can use the following command to compress a file.

7zz a archive.7z file.txt

Extracting a file:

To extract a file from an archive, use the command below.

7zz x archive.7z -y

Listing the contents of an archive:

You can use the following command to view the contents of an archive.

7zz l archive.7z

Adding files to an existing archive:

To add additional files to an archive that already exists, use the following command.

7zz u archive.7z file2.txt

Extracting files with full path:

The following command can be used to extract files along with their complete path.

7z x archive.7z -o/path/to/extract/

These are just a handful of the numerous tasks that can be accomplished using the command-line interface of 7-Zip.

FAQs to Install 7-Zip on Debian 12

Is 7-Zip available for free on Debian 12? 

Yes, 7-Zip is completely free to use on Debian 12, as it is an open-source software distributed under the GNU LGPL license.

Is 7-Zip available for both 32-bit and 64-bit systems on Debian 12? 

Yes, 7-Zip is available for both 32-bit and 64-bit versions of Debian 12. You can install the appropriate package based on your system architecture.

Does 7-Zip work with all file formats? 

Yes, 7-Zip supports a wide range of file formats, including ZIP, RAR, TAR, GZIP, and more.

Can I create password-protected archives with 7-Zip?

Absolutely. 7-Zip allows you to encrypt your archives with strong passwords to protect your files.

How can I extract files using 7-Zip in Debian 12? 

Simply right-click on the archived file, select "Extract Here," and 7-Zip will automatically extract the files.

Can I use 7-Zip to split large files into smaller parts? 

Yes, 7-Zip offers the ability to split large files into smaller parts, making it easier to store or transfer them.

Are there any alternatives to 7-Zip available for file compression on Debian 12? 

Yes, alternative file compression tools available for Debian 12, such as "gzip," "tar," and "zip," but 7-Zip offers a wider range of supported formats and advanced features.

Conclusion

We hope this tutorial helped you understand how to install 7-Zip on Debian 12.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.