In this article, we want to teach you How To Set up 7-Zip on AlmaLinux 8.
7-Zip is a free and open-source file archiver for compressing and uncompressing files. If you need to save some disk space or make your files more portable, this software can compress your files into an archive with a .7z extension.
Here are 7-Zip features:
- Free of charge — you don’t need to spend a dime to use it.
- High compression ratio — for ZIP and GZIP formats, 7-Zip has a better compression ratio than that of PKZIP and WinZip.
- Free for commercial use — 7-Zip is protected by the GNU LGPL license, thus allowing you to copy and distribute the software legally.
- Localized — the software is available in 87 languages.
- Windows integration — 7-Zip is compatible with Windows Shell.
- Secure — the software uses the AES-256 file encryption system.
How To Set up 7-Zip on AlmaLinux 8
Before you start to set up 7-Zip on AlmaLinux 8, you need to log in to your server as a non-root user with sudo privileges. To do this, you can follow our article the Initial Server Setup with AlmaLinux 8.
Now follow the steps below to install 7-Zip on your server.
Install 7-Zip on AlmaLinux 8
By default, 7-Zip is not enabled in most Linux distros. The 7-Zip package in Linux distributions is called p7zip.
First, update your local package index with the command below:
sudo dnf update -y
Then, you need to enable the Epel repository on your server with the following command:
sudo dnf install epel-release
Now use the command below to install 7-Zip on AlmaLinux 8:
sudo dnf install p7zip p7zip-plugins
Verify that you have successfully installed 7-Zip:
Output 7-Zip  16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs QEMU Virtual CPU version 2.5+ (6D3),ASM) Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...] [<@listfiles...>] ...
How To Use 7-Zip on AlmaLinux 8
At this point, you can select any file to make a compressed file by using 7-Zip.
To list all files and folders of your current directory, you can use the command below:
Then, to compress a file you can use the “a” option in the 7-Zip command. For example:
7z a data.7z data.txt
Also, to display a list of detailed information of each archive file, you can use the following command:
7z l data.7z
And to extract the files and folder you can use the “e” option. For example:
7z e data.7z
For more options and switches, you can check the command below:
At this point, you learn to Set up 7-Zip on AlmaLinux 8 and some basic usage of it.
Hope you enjoy it.