Password protect file using 7z in Linux from the terminal

This is a short post on how to password protect a file using 7z in Linux from the terminal.

Below is the sample command that encrypts file “file.txt” with password (Replace PASSWORD with your pass) and saves to encrypted zip file Protected.zip

7z a Protected.zip -pPASSWORD file.txt

Credits/References:

Stackoverflow

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.