How to install 7zip on Ubuntu 20.04?

Overview

Known for its excellent compression ratio and ability to extract files like 7z, zip, tar, and others, 7zip is a common compression tool that makes moving large files and folders around smoothly much simpler.

In this tutorial, you learn how to install 7zip on Ubuntu 20.04 and compress files with it.

Prerequisites

There are certain prerequisites that need to be met before you begin.

  • Ubuntu 20.04 LTS configured on your system.

  • Non-root sudo user privileges.

Get Started

Step 1: Update Ubuntu’s package list.

sudo apt update

Step 2: Install the complete 7zip package.

sudo apt install p7zip-full 

Step 3: Verify the installation.

7z 

Step 4: View all the system files to choose the ones to compress.

ls –la 

Step 5: Use the syntax "7z a [compressed file] file1 file2" to compress files. Here, the .Xauthority and .bashrc files will be compressed.

7z a new.zip .Xauthority .bashrc 

Step 6: Use the syntax “7z I [compressed file]” to display the details of the compressed file.

7z I new.zip 

Step 7: Use the syntax “7z e [compressed file]” to extract the compressed files.

7z e new.zip 

Conclusion

In this tutorial, you learnt how to set up 7zip on Ubuntu 20.04 and compress files using it.

Last updated