When you move a large file or a large folder from one place to another, it is best to use compression tools to make this easier. One of the most popular software is 7-zip, this is software with a high compression ratio and does not win awards. It works on most operating systems and you can use it to extract files like 7z, zip, tar.
Basically, 7Zip is an open-source software available to compress and decompress files and folders into various formats. A 7Zip archive file usually ends in .7z extension.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux system packages installation queries.
In this context, we shall look into how to install 7-zip on Ubuntu 20.04.
1. Perform System Update
First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal:
$ sudo apt update
$ sudo apt upgrade
2. Install p7zip
Now, install p7zip-full package:
$ sudo apt install p7zip-full
After installation, you can verify it by running the below command:
$ 7z
Here, We will try compressing some files by using 7-zip.
Run ls -la:
$ ls -la
1. Using a option to archive or compress:
$ 7z a [compressed file] file
For example, I will compress 2 files: .profile and .bashrc into a file named demo.zip:
$ 7z a demo.zip .profile .bashrc
2. Using l option to show the detail of compressed file:
$ 7z l [compressed file]
For example:
$ 7z l demo.zip
3. Using e option to extract file:
$ 7z e [compressed file]
For example:
$ 7z e demo.zip
This article covers how to install 7-zip on Ubuntu 20.04 LTS Focal Fossa system. In fact, 7-Zip is an archive format that is widely used and gives a high compression rate.
How to Use 7Zip in Ubuntu Linux system ?
If you are on Ubuntu run the following commands:
$ sudo add-apt-repository universe
$ sudo apt update
After you have updated all your repositories run the following command to install 7Zip:
$ sudo apt install p7zip-full p7zip-rar