7z
This guide explain how you can install, compress and decompress archives in your lab with the 7z software, such as zip files.
Installation
Install 7z on your lab machine
Log into your lab machine and run the following code:
bash
sudo apt update && sudo apt-get install p7zip-fullInstall 7z on your local computer
You can also install the 7z software on your own local computer:
::: expander "Windows" id="2-windows"
Download 7-Zip installer from official pages: 7-Zip website
Note: First option from download list on 7-zip website linked above should work in most cases.
NTNU users
NTNU users can install 7-zip from the Software Center.
::: expander "Mac OS" id="2-macos"
We recommend opening your zip files with Keka.
After successfull installation, Keka requires permissions to your home folder.
You can find this under File Access in Keka.
:::
::: expander "Ubuntu" id="2-ubuntu"
Install 7-zip command line tool using this command:
:::
Extract an archive
::: expander "Windows" id="3-windows"

:::
::: expander "Mac OS" id="3-macos"
Right click on your archive and select Open With --> Keka.
:::
::: expander "Ubuntu / Linux" id="3-ubuntu"
Use the following code to extract an archive on your lab machine:
bash
# -- extract 7z
7za e <myfile>.7z
# -- extract zip
7za e <myfile>.zip:::
Compress small folders
This command allows you to compress and encrypt a folder in your lab:
bash
# -- 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/scratch/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:
bash
7za a -v100G <filename-for-new-file.7z> <lab-folder> -p<key>