
Here is the command syntax: 7z a archivefile.7z target-folder -pĪrchivefile.7z – It is the file name that you want to use for your compressed folder, replace it with whatever you want with 7z other supported extensions by 7-zip. mx=9, the number 9 is the level of compression that you can reduce if needed.ĭo you want to create a password for the file or folder you are compressing? Then that can be possible as well using 7-zip. 7z u -mx=9 ArchivName.7z FolderToCompress/* Those who want to control the compression level of the file can go for the given 7-zip command syntax. Creating an archive – Example highest compression:

If you want all files to be exported to a folder without keeping the folder structure, the following command can be used. If you want to see what is inside some archive but without extracting it, then that is possible using the given command syntax: 7z l Archive-file-Name To use any other archive format use that extension, for example, to get the archive in zipped format, the command will be like this way: Therefore, for example, if we say the folder name that we want to compress is “ pics” then the command will be like this 7z a pics.7z pics To check its version and options to use, we can use: 7z -hħ-zip offers a quick command-line method to create archive files in the terminal using 7Zip will be: Hence, just run the given command that uses the APT package manager to install the 7-zip complete package. The installation of 7-zip doesn’t require any third-party repository we can install it using Ubuntu’s standard one.

In this tutorial we will use the APT package manager and system default source repository, hence first, run the system update command to refresh and rebuild its cache. The steps are given here can be used for other Ubuntu versions such as 20.04/18.04 including Debian, Linux Mint, POP_OS, Elementary OS, and other similar Linux. Steps to install 7-Zip on Ubuntu 22.04 LTS Linux Steps to install 7-Zip on Ubuntu 22.04 LTS Linux.
