DebianDebian Based

How To Install 7-Zip on Debian 11

Install 7-Zip on Debian 11

In this tutorial, we will show you how to install 7-Zip on Debian 11. For those of you who didn’t know, 7-Zip is a popular open-source file-archiving software that can be used to compress and decompress files on a variety of platforms, including Windows, Linux, and macOS. It supports a wide range of file formats, including .7z, .zip, .rar, and .tar, and offers both command-line and graphical user interface (GUI) options for interacting with compressed files.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the 7-Zip archiving software on a Debian 11 (Bullseye).

Prerequisites

  • A server running one of the following operating systems: Debian 11.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for 7-Zip.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install 7-Zip on Debian 11 Bullseye

Step 1. Before we install any software, it’s important to make sure your system is up to date by running the following apt commands in the terminal:

sudo apt update
sudo apt upgrade
sudo apt install dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https curl

Step 2. Installing 7-Zip on Debian 11.

By default, 7-Zip is available on the Debian 11 base repository. So, now run the following command below to install the latest version of the 7-Zip package to your Debian system:

sudo apt install p7zip-full

Step 3. Basic Usage of 7-Zip.

Once successfully installed, you can use it to compress and decompress files from the command line. The basic syntax for compressing a file is:

  • Archiving: To create a new archive, you can use the 7z a command followed by the name of the archive you want to create and the files you want to include in it. For example, 7z a my-archive.7z file1.txt file2.txt will create a new archive called my-archive.7z that includes file1.txt and file2.txt.

  • Extracting: To extract files from an archive, you can use the 7z e command followed by the name of the archive. For example, 7z e my-archive.7z will extract all the files from my-archive.7z in the current directory.
  • Listing: To list the contents of an archive, you can use the 7z l command followed by the name of the archive. For example, 7z l my-archive.7z will list all the files and directories included in my-archive.7z
  • Testing: To test the integrity of an archive, you can use the 7z t command followed by the name of the archive. For example, 7z t my-archive.7z will test the archive and return any errors or issues with the archive.
  • Updating: To update an existing archive with new files, you can use the 7z u command followed by the name of the archive and the files you want to add. For example, 7z u my-archive.7z file2.txt will add file2.txt to my-archive.7z

Congratulations! You have successfully installed 7-Zip. Thanks for using this tutorial for installing the latest version of 7-Zip archiving app on Debian 11 Bullseye. For additional help or useful information, we recommend you check the official 7-Zip website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

Back to top button