Share your love
How To Install 7-Zip on Ubuntu 22.04 | Easy File Archiver

In this guide on the Orcacore website, we want to teach you How To Install 7-Zip on Ubuntu 22.04. 7-Zip is a file archiver with a high compression ratio. You can use 7-Zip on any computer, including a computer in a commercial organization. You don’t need to register or pay for 7-Zip.
7-Zip works for Windows 7, Vista, XP, 2008, 2003, 2000, NT, ME, and 98. And there is a port of the command line version to Linux/Unix.
Most of the source code is under the GNU LGPL license. The unRAR code is under a mixed license with GNU LGPL + unRAR restrictions.
Table of Contents
Steps To Install 7-Zip on Ubuntu 22.04
To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on the Initial Server Setup with Ubuntu 22.04.
1. Installing 7-Zip with APT Command
By default, 7-Zip is available in the default Ubuntu repository. First, update and upgrade your local package index with the following command:
sudo apt update && sudo apt upgrade -y
Then, use the command below to install 7-Zip on your server:
sudo apt install p7zip-full -y
That’s it. By using a single command, you have installed 7-Zip on your server.
2. How To Use 7-Zip on Ubuntu 22.04?
The general syntax of 7-Zip is like this:
7z <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]
You can find the switches and commands for 7-Zip with the following command on Ubuntu 22.04:
7z -h


Let’s see some examples of using 7-Zip.
To add files to the archive, you can use the 7z a command on Ubuntu 22.04, for example:
7z a {file-name}.7z {file-name}.txt
To extract or open an archive in the current directory, you can use the 7z e command, for example:
7z e {file-name}.7z
You can use the 7z x command on Ubuntu 22.04 to extract or open an archive in the current directory, for example:
7z x {file-name}.7z
Also, you can list all contents in the archive with the following 7z l command:
7z l {file-name}.7z
Conclusion
At this point, you have learned to install 7-Zip on Ubuntu 22.04. Installing 7zip on Ubuntu 22.04 is quick and easy using the p7zip-full package. With a simple command like sudo apt install p7zip-full, you can enable support for creating and extracting 7z archives. This ensures efficient file compression and compatibility with various formats.
Hope you enjoy it. Please subscribe to us on Facebook, Instagram, and YouTube.
You may also like to read the following articles:
Installing FastAPI with MongoDB on Ubuntu 24.04
Install Podman on Ubuntu 24.04
Install PyCharm on Ubuntu Linux
FAQs
How do I check if 7-Zip is installed?
You can verify it by checking its version: 7z --version
What is the difference between p7zip and p7zip-full?
p7zip: A minimal package with basic functionality.
p7zip-full: Includes full support for creating and extracting 7z archives.
Can I extract other archive formats with 7-Zip?
Yes, 7-Zip supports formats like ZIP, TAR, GZIP, BZIP2, and more.
Is 7-Zip available with a GUI on Ubuntu?
Yes, you can install p7zip-full with file-roller to use a graphical interface.