You are on page 1of 12

01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.

04 - LinuxCapable

LINUX COMMANDS LINUX DISTROS SYSADMIN

Home » Ubuntu » How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04

How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04


Originally posted on Tuesday, May 2, 2023 by Joshua James
Last Updated on Friday, February 23, 2024
Estimated reading time: 6 minutes

This guide will demonstrate how to install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 LTS Linux releases utilizing Recent Posts
the command-line terminal.

→ How to Install
7-Zip stands out as a powerful file archiver, renowned for its high compression ratio and versatility across
ClamAV on
TOC Index

various operating systems, including Linux. It supports multiple compression formats, making it an
Ubuntu 24.04,
indispensable tool for users looking to manage their files efficiently. With its open-source nature, 7-Zip
22.04 or 20.04
offers a cost-effective solution for both personal and professional use.

Key features include:

High compression ratio in 7z format with LZMA and LZMA2 compression How to Install

Support for multiple formats, including ZIP, TAR, RAR, and more SSH on Ubuntu
24.04, 22.04 or
Strong AES-256 encryption in 7z and ZIP formats for secure file handling
20.04
Ability to self-extract for 7z format, enhancing user convenience
Integration with the Windows Shell for easy access and management
Powerful file manager and command-line version for advanced users
Localization for 87 languages, making it accessible worldwide
Plugin for FAR Manager, further extending its capabilities How to Set Java Environment Path in
Ubuntu

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 1/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

7-Zip’s functionality goes beyond mere file compression, offering features tailored for efficient file
management and security. Whether you’re looking to free up storage space, secure sensitive information, or
manage a wide range of file types, 7-Zip provides the tools you need in a straightforward, user-friendly
package.

Now, let’s dive into the technical aspects of getting 7-Zip up and running on your Ubuntu system, ensuring
you can easily leverage these powerful features.
How to Install
PhotoQT on
Table of Contents
Ubuntu 24.04,
22.04 or 20.04
Install 7-Zip on Ubuntu via Source Binary

By default, 7-Zip is not included in Ubuntu’s repository; another foss community exists, but the differences
are considerable. We will achieve this in this guide for the traditional 7-Zip installation by downloading the 7-
Zip binary. How to Install

gThumb on
TOC Index

Ubuntu 24.04,
Update Ubuntu Before 7-Zip Installation
22.04 or 20.04

First, to ensure you only have the source version installed, remove the free foss version p7zip-full from your
Ubuntu system:

How to Install
sudo apt remove p7zip-full TeamViewer on
Ubuntu 22.04 or
20.04
Download 7-Zip Binary

Visit the official 7-Zip website and select the appropriate version and architecture of the 7-Zip binary that is
compatible with your system. Save the file to your computer. Translate:

For this guide, we will demonstrate using the latest version of 7-Zip, version 23.01 (2023-06-20), and the 64-
bit Linux x86-64 architecture.

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 2/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

Selecione o idioma

Powered by Tradutor


TOC Index

Screenshot of the 7-Zip archive download page, compatible with Ubuntu 24.04, 22.04, 20.04.

Download 7-Zip using the wget command below:

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

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 3/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

Note: The command above is an example. The version and architecture of 7-Zip you download may vary
depending on your system’s specifications. Different variants of 7-Zip are available for different
architectures.

Extract the 7-Zip Archive

First, make a new folder:

mkdir 7zip

Extract the archive using the following command:

tar xf 7z2301-linux-x64.tar.xz -C 7zip



TOC Index

The above command extracts the contents from the downloaded 7-Zip archive into the dedicated folder,
which we will move later so you have better access to 7zz commands.

Run 7-Zip Binary

Now, navigate to the directory you made and extract 7-Zip too:

cd 7-zip

You can now run 7-Zip on Linux using the following command:

./7zz

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 4/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

When using 7-Zip from a different working directory, you must provide the full path to the binary. You can
add the binary to the

Make 7-Zip Accessible System-Wide

Move the 7-Zip binary to the /usr/local/bin directory using the following command:

sudo mv ~/7zip /usr/local/bin

By adding the binary to the /usr/local/bin directory, you can now access 7-Zip from any location on your
filesystem by simply using the 7zz command.


TOC Index

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 5/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable


TOC Index

Demonstrating 7-Zip successfully operating on Ubuntu versions 24.04, 22.04, and 20.04.

Basic 7-Zip Commands with Ubuntu

This section will cover some common 7-Zip commands that you may find helpful when working with
archives. These commands will help you manage your files and perform various operations such as
compressing, decompressing, and listing archive contents.

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 6/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

Create an Archive with 7-Zip

To create a new archive, you can use the following command structure:

./7zz a <archive_name> <file_or_directory>

For example, to create a 7z archive named example.7z containing a file called file.txt, you would use
the following command:

./7zz a example.7z file.txt

This command creates an archive named example.7z and adds file.txt to it. You can replace file.txt
→ with a directory to archive an entire directory.
TOC Index

Extract an Archive with 7-Zip

To extract the contents of an archive, you can use the following command structure:

./7zz x <archive_name>

For example, to extract the contents of an archive named example.7z, use the following command:

./7zz x example.7z

This command extracts the contents of example.7z to the current directory.

List Archive Contents with 7-Zip

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 7/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

If you want to view the contents of an archive without extracting it, you can use the following command
structure:

./7zz l <archive_name>

For example, to list the contents of an archive named example.7z, use the following command:

./7zz l example.7z

This command displays the files and directories contained within example.7z without extracting them.

Update an Existing Archive with 7-Zip



To update an existing archive with new or modified files, you can use the following command structure:
TOC Index

./7zz u <archive_name> <file_or_directory>

For example, if you have an existing archive named example.7z and you want to update it with a modified
file.txt, use the following command:

./7zz u example.7z file.txt

This command updates the example.7z archive with the latest version of file.txt.

Test Archive Integrity with 7-Zip

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 8/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

To check the integrity of an archive and ensure there are no errors or corruption, use the following command
structure:

./7zz t <archive_name>

For example, to test the integrity of an archive named example.7z, use the following command:

./7zz t example.7z

This command verifies the integrity of example.7z and reports any issues detected.

Closing Thoughts

In this guide, we walked through the steps to install 7-Zip on Ubuntu versions 24.04, 22.04, and 20.04 LTS,
TOC Index

showcasing how straightforward it is to set up this powerful archiving tool using the command-line
terminal. Remember, 7-Zip is your go-to for managing a wide array of file formats with high compression
ratios and robust encryption. For anyone dealing with large files or needing secure file management, I highly
recommend giving 7-Zip a try on your Ubuntu system. It’s a simple yet effective tool that can greatly impact
your daily computing tasks. Happy archiving!

You May Also Like:


1. How to Install WordPress with Nginx on Ubuntu 22.04 or 20.04
2. How to Install ModSecurity 3, OWASP CRS with Nginx on Ubuntu 22.04 or 20.04
3. How to Install UNRAR on Ubuntu 22.04 or 20.04
4. How to Install Apache Subversion on Ubuntu 22.04 or 20.04
5. How to Install Matomo with Nginx on Ubuntu 24.04, 22.04 or 20.04
6. How to Install Apache Maven on Ubuntu 22.04 or 20.04
7. How to Install WonderCMS with Nginx on Ubuntu 24.04, 22.04 or 20.04
8. How to Install Jellyfin Media Server on Ubuntu 22.04 or 20.04
9. How to Upgrade to Ubuntu 23.04 Lunar Lobster
https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 9/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

10. Upgrade to Ubuntu 24.04 Noble Numbat Desktop or Server

Ubuntu

How to Install FileZilla on Ubuntu 24.04, How to Install Slack on Ubuntu 24.04, 22.04
22.04 or 20.04 or 20.04

Leave a Comment


TOC Index

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

Notify me via e-mail if anyone answers my comment.

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 10/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

I consent to LinuxCapable collecting and storing the data I submit in this form. (Privacy Policy) *

Sucesso!
Privacidade•Termos

POST COMMENT


TOC Index

If you have any legitimate inquiries, such as article


suggestions, don't hesitate to contact LinuxCapable.
Kindly ensure that your message is written in the English
language.

CONTACT US

About Us Copyright Policy Disclaimer Privacy Policy

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 11/12
01/04/2024, 11:31 How to Install 7-Zip on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

Terms & Conditions


TOC Index

https://www.linuxcapable.com/how-to-install-7-zip-on-ubuntu-linux/ 12/12

You might also like