Like Windows users, Linux users also have many tools in hand to perform file compression tasks. Compression is a mandatory task as large files take a lot of space on a disk and are difficult to transfer from one device to another. 7-ZIP is an open-source compression tool. It is available for most popular operating systems like Windows, Linux, and other Linux distributions such as Ubuntu, Debian, etc. It supports multiple file formats, AES-256 encryption, and a high compression ratio. 7-zip tool is available in both desktop and graphical user interface environments, and the command-line is suitable for all servers. This tool works in more than 87 languages.
We will go through the installation and usage of the 7-zip compression tool in this article. We will execute all steps on Ubuntu 20.04 distribution.
Installation of 7ZIP GUI in Ubuntu 20.04
The two different methods are available to install the 7zip compression tool on the Ubuntu 20.04 environment.
- Installation of 7zip using the apt repository
- Installation of 7zip desktop using snap
Method 1: Installation of 7zip using the apt repository
The above installation method for 7zip will complete into the following steps:
Step 1: Add Ubuntu Universe repository
Open the command-line application ‘Terminal’ through searching in Applications or use the keyboard shortcut Ctrl+Alt+t. 7zip is available in the official Universe repository of Ubuntu. Therefore, If Universe repo is not already added into your system, then; first add it by running the below-mentioned command:
Step 2: Update the system packages list
Now, using the apt update command, update all the packages of the system as follows:
Step 3: Install 7zip
To install all types of 7zip packages on your system, use the following command for installation:
The above-given terminal command will provide you the 7zip archive facility on your system. So, by pressing ‘y’ proceed further and hit ‘Enter key.
Once the installation of 7zip is completed, type ‘7z’ on the terminal, and the installed version details will display on the terminal window as follows:
Method 2: Installation of 7zip desktop using snap
To install the 7zip desktop interface version on your Ubuntu system, use the snap application. Snap package comes as a universal package in all kinds of Ubuntu distributions. Therefore, users do not need to include an external repository in the Ubuntu system. To install the 7zip desktop version using snap, run the below-given command:
Authenticate the user by typing the password in the given field.
After running the about command, be patient for few minutes. After that, the 7zip compression tool will automatically install on your system.
Launch 7zip desktop interface
To launch the desktop interface of the 7zip tool, click on the Activities and type ‘p7zip’ in the application search bar. The following icon shows on the desktop:
Click on the p7zip application icon, and the following interface will display on your system:
Use of 7zip Tool on Ubuntu
As we know already from feature information of 7-zip, it provides both graphical user and command-line interface.
Using 7zip tool on Ubuntu through GUI
After clicking on the 7-zip icon, a file explorer will open inside the 7-zip compressor.
Click on the required file or folder and press the “ADD” button.
As you press the add button, the settings will open the 7zip tool. Now, based on your requirements, you can choose the below-given settings to compress the file using 7zip.
|Archive format||Select the required format from the list of available formats.
|Compression Level||You can select the required compression level from the given options: Fast, Normal, Maximum, and Ultra.|
|Compression Method||This method provides different encoding options. You can leave it as the default, or if you have an idea about this option, you can select the required method.|
|Encryption||In this option, one can choose a password for their compressed files|
Another quick method to compress a folder using the 7zip tool via GUI is also given here. Right-click on the desired folder and select the ‘compress’ option from the drop-down items.
In the displaying dialog, you will choose in which format you want to compress the desired folder. Select ‘.7z’ and decide a name for the archive. Now, click on the ‘Create’ button.
Using 7zip tool on Ubuntu through command line
An alternative method for users is also available who prefer to use software tools through the terminal commands. To compress a file or folder using the 7zip tool via the terminal command, use the following syntax:
For example, we want to compress a ‘Documents’ folder placed in the ‘Downloads’ directory. So, navigate into the Downloads using the ‘ls’ command and use the following command to compress the ‘Documents’ folder:
To list the 7zip archive folder details, use the below-mentioned command:
To extract the 7zip-compressed folder, use the below-mentioned command that will extract all files of the given archive:
This article explains the steps of installing and using the 7-zip compressor tool in Ubuntu 20.04. We have seen how it works on the Ubuntu system. I hope you liked this 7zip tool guide. Give your suggestions via comments.