How to Install 7-Zip on Manjaro 21 Linux

Created in 1999, 7-Zip is a free, open-source file archiver software that compresses files into archive containers with higher compression rates than most other archivers. In addition to beating most other forms of compression by 2-10%, 7-Zip also supports strong AES-256 encryption in 7z and ZIP formats. While 7-Zip may not be as famous as some archivers, its multi-archive format support across most known software makes it a powerful option for those seeking an archive solution. Overall, 7-Zip is a reliable and efficient file archiver worth checking out.

Formats that 7-Zip supports are as follows.

  • Compress only: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM

The following tutorial will teach you how to install 7-Zip on Manjaro 21 Linux. The tutorial will use the command line terminal with yay AUR helper. Ideally, most users may be using some wrapper for Pacman; for new users, it is essential to install one to keep your packages up-to-date while you learn Arch/Manjaro.

Update Manjaro Linux

Before you begin, ensure your system is up-to-date to avoid any conflicts during the installation, and for good practice, use the terminal command as follows.

sudo pacman -Syu

Install yay Helper

To begin the installation, you must have GIT installed to import the yay repository to install/build. From your command terminal, use the following code to begin the installation.

sudo pacman -S --needed --noconfirm base-devel git

Now clone the yay archive using the following terminal command.

git clone

Next, move the archive to the /OPT/ directory. This is a good location for any other archive installs, keep everything located, and traditionally the directory is a commonly used area for different applications.

sudo mv yay-git /opt/

Now navigate to the yay-git directory location.

cd /opt/yay-git

Build the package using the makepkg command.

makepkg -si

Install 7-Zip

Now that you have installed the yay package management helper, you can install the software using the following command.

yay -S 7-zip --noconfirm

Remove –noconfirm to manually go through the installation questions instead of selecting the default answers.

Currently, three versions exist in the AUR; if you have any issues, you can remove an install an alternative, but this version has the most votes and popularity.

Example 7-Zip Terminal Commands

Below are some basic commands and examples of using 7-Zip. While they do not show everything possible, they cover 75% of daily users’ use.

The command example syntax for 7-Zip is as follows.

7z <command> [<switches>...] <archive_name> [<file_names>...]

The first command that is most helpful before the tutorial continues is the help command.

7z -h

Example output:

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]

  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
  rn : Rename files in archive
  t : Test integrity of archive
  u : Update files to archive
  x : eXtract files with full paths

  -- : Stop switches parsing
  @listfile : set path to listfile that contains file names
  -ai[r[-|0]]{@listfile|!wildcard} : Include archives
  -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives
  -ao{a|s|t|u} : set Overwrite mode
  -an : disable archive_name field
  -bb[0-3] : set output log level
  -bd : disable progress indicator
  -bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
  -bt : show execution time statistics
  -i[r[-|0]]{@listfile|!wildcard} : Include filenames
  -m{Parameters} : set compression Method
    -mmt[N] : set number of CPU threads
    -mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra)
  -o{Directory} : set Output directory
  -p{Password} : set Password
  -r[-|0] : Recurse subdirectories
  -sa{a|e|s} : set Archive name mode
  -scc{UTF-8|WIN|DOS} : set charset for for console input/output
  -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
  -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands
  -sdel : delete files after compression
  -seml[.] : send archive by email
  -sfx[{name}] : Create SFX archive
  -si[{name}] : read data from stdin
  -slp : set Large Pages mode
  -slt : show technical information for l (List) command
  -snh : store hard links as links
  -snl : store symbolic links as links
  -sni : store NT security information
  -sns[-] : store NTFS alternate streams
  -so : write data to stdout
  -spd : disable wildcard matching for file names
  -spe : eliminate duplication of root folder for extract command
  -spf : use fully qualified file paths
  -ssc[-] : set sensitive case mode
  -ssw : compress shared files
  -stl : set archive timestamp from the most recently modified file
  -stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
  -stx{Type} : exclude archive type
  -t{Type} : Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
  -v{Size}[b|k|m|g] : Create volumes
  -w[{path}] : assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]{@listfile|!wildcard} : eXclude filenames
  -y : assume Yes on all queries

Add Files to Archive

To add files to the archive, use the 7z -a command.


7z a {file-name}.7z {file-name}.txt

Extract Archive – No Path Generation

To extract or open an archive in a current directory, use the 7z e command.


7z e {file-name}.7z

Extract Archive – Full Path Generation

To extract or open an archive in a current directory, use the 7z x command.


7z x {file-name}.7z

List Archive Contents

To list all contents in the archive, use the following 7z l command.


7z l {file-name}.7z

Test Archive Integrity

To test the integrity of an archive for performance and corruption purposes, use the following 7z t command.


7z t {file-name}.7z

These commands are just some of the most common; check the help menu to find additional options, as there are plenty.

How to Update/Upgrade 7-Zip

The best way to upgrade the software is to use the following terminal command.

yay -Syu --devel --timeupdate

Note it is advised to run terminal commands now and then even if you have set up AUR auto-updates using the automatic GUI updater; this ensures you are not missing anything.

How to Remove (Uninstall) 7-Zip

When you no longer want the software installed on your system, use the following command to remove it.

yay -Rns 7-zip  --noconfirm

Optionally, you can run the following command to clean up any leftover unused dependencies, and this is highly recommended to run so your system does not become bloated.

yay -Yc

Comments and Conclusion

7-Zip is significant compression and encryption software that is easy to use. It outperforms most other Zip applications, and it’s free! If you are looking for an alternative to WinZip or compressed files on your computer, we recommend giving 7-Zip a try.

Not what you were looking for? Try searching for additional tutorials.

Leave a Comment