Install 7Zip Compression Tool on Ubuntu


How to Install 7-zip on Ubuntu and use it to compress and decompress any file or folder

When you want to transfer large size of files or folder from one location to another then you need to use any good compression tools for making the task easier.  Many free tools are available to compress and decompress files and folders. One of them is 7-zip file archiver. It is an award-wining open-source file archiver with high compress ratio. This software supports most of the popular operating systems and multiple file formats. You can use this to compress and decompress files and folders in 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM formats. Some important features of this tool are mentioned below.

  • It provides better compression ratio which is 2-10% better than other similar tools.
  • It uses strong AES-256 encryption.
  • It has self-extracting capability for 7z file format.
  • It supports 87 languages

In this tutorial, you will learn how you can install and use 7-zip file archiver on Ubuntu operating system.

7-zip Installation:

Update your operating system before running the command to install 7-zip file archiver.

$ sudo apt-get update

p7zip package contains 7-zip. Two types of p7zip packages are available. These are p7zip and p7zip-full. If you want to make auto extractable archive also with other archive options then install p7zip-full. The command for p7zip-full package is executed here.

$ sudo apt-get install p7zip-full

Check the package is properly installed or not by using 7z command.

$ 7z

p7zip 16.02 version is installed here which contains 7-zip 16.02.

Using 7-zip

Select any file or folder to make compress file by using 7-zip. Type ls -la command to show the list of all files and folders of the current directory. Here, data.txt file is selected for compression. The size of the file is 540 bytes.

$ ls -la

Run the command to create compressed file named data.7z. The option a is for archive or compress.  After compression, the size of archive file is 152 bytes.

$ 7z a data.7z data.txt

To show the detail information list of any archive file, run 7z command with l option.

$ 7z l data.7z

Run 7z command with e option to decompress or extract the files and folder from a archive file.

$ 7z e data.7z

By using above steps you can create archive file of any folder also. You can create archive file of files and folders without using commands or terminal. Go to file location, select the file and right click on it to open pop-up menu. Click compress option from menu to create archive file.

Three archive options are available in the dialog box which are .zip, .tar.xz, .7z. Here, .zip is selected to create a compressed file named

7-zip archiver is an efficient tool to compress and decompress your necessary files and folder.  You can easily transfer large amount of data by using this archiver.


ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

[CentOS 8] Hướng dẫn cài đặt CentOS 8

RHEL 8 đã được công bố vào dịp tháng 05.2019, thường lệ thì CentOS8 tương ứngcũng sẽ được...

Hex Editors on Linux

Hex editors are used to inspect the compiled executables or binary files. You can easily use a hex editor to change how...

Notepad++ Alternatives For Linux

This article aims to introduce you to some of the most popular Notepad++ alternatives for Linux including the installation,...