# 7z

This guide explain how you can install, compress and decompress archives in your lab with the 7z (opens new window) software, such as zip files.

# Install the software

Install the 7z software on your lab machine:

# Ubuntu

sudo apt update && sudo apt-get install p7zip-full

You can also install the 7z software on your own local machine:

# Mac OS X

REQUIREMENT

Installation of package manager for macOS: Homebrew (opens new window)

brew install p7zip

If you do not want to install Homebrew or if you simply prefer an application with graphical interface, you can also give a try to Keka (opens new window).

# Windows

TIP

NTNU users can also install 7-zip using Software Center (opens new window).

https://www.7-zip.org/download.html

# Extract an archive

WINDOWS

Windows users can extract 7-zip archive by right clicking the file and selecting one of the 7-zip options to extract files. Details (opens new window)

7za e <myfile>.7z

or

7za e <myfile>.zip

# Compress small folders

This command allow you to compress and encrypt a folder:

7za a <filename-for-new-file.7z> <lab-folder> -p<key>
  • <filename-for-new-file.7z> - Replace this with the name for you new compressed archive.
  • <lab-folder> - Replace this with the path of the folder (or file) in your lab that will be compressed, for example /mnt/cargo/export-folder/.
  • <key> - Replace this with the key (passphrase) that you will use to encrypt your archive and the receiever will use to decompress your archive. We recommend that your choose a passphrase of at least 12 characters.

Key transfer

Always transfer your key in a separate channel than your file. For example, you may consider to transfer files directly over SSH or filesender.no and keys over the encrypted mobile app Signal.

# Compress large folders

For larger folders we recommend to split your compressed file into several parts for easier transfers. The code below split your folder into 100G chunks:

7za a -v100G <filename-for-new-file.7z> <lab-folder> -p<key>