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

7z a -pPASSWORD file.txt



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.