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 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:
Download 7-Zip installer from official pages: 7-Zip website (opens new window)
Note: First option from download list on 7-zip website linked above should work in most cases.
NTNU users can install 7-zip from the Software Center (opens new window).
# Mac OS
We recommend opening your zip files with Keka (opens new window).
After successfull installation, Keka requires permissions to your home folder.
You can find this under
File Access in Keka.
# Extract an archive
# Ubuntu / Linux
Use the following code to extract an archive on your lab machine:
# -- 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:
# -- principal examples 7za a <filename-for-new-file.7z> <lab-folder> -p<key>
<filename-for-new-file.7z>with the name for your to-be compressed archive.
<lab-folder>with the path of the folder (or file) in your lab that you aim to compress, for example
<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>