# 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.

# Installation

# Install 7z on your lab machine

Log into your lab machine and run the following code:

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

# Install 7z on your local computer

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


7-Zip website (opens new window)

Note: First option from download list on 7-zip website should work in most cases.

::: NTNU users NTNU users can install 7-zip from the Software Center (opens new window).

OS X / MacOS

We recommend opening your zip files with Keka (opens new window).

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

# Extract an archive




Use the following code to extract an archive on your lab machine:

# -- extract 7z
7za e <myfile>.7z

# -- extract zip
7za e <myfile>.zip

Right click on your archive and select open with --> Keka

# Compress small folders

This command allows you to compress and encrypt a folder in your lab:

# -- principal examples
7za a <filename-for-new-file.7z> <lab-folder> -p<key>
  • Replace <filename-for-new-file.7z> with the name for your to-be compressed archive.
  • Replace <lab-folder> with the path of the folder (or file) in your lab that you aim to compress, for example /mnt/cargo/export-folder/.
  • Replace <key> with a key (passphrase) that you generate. This key is used to encrypt your archive. We recommend that your choose a passphrase of at least 12 characters.

Secure key transfers

Transfer your key in a separate channel than your compressed file. For example, you may consider to transfer your compressed file over SSH or filesender.no, and to transfer your archive key 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>
Last Updated: 3/29/2023