Password Protect a Zip File in Linux Command Line

You can interactively password protect a zip file while creating it. For this, use the -e option of zip command.

zip -e <your-files-to-zip>

This will prompt for password. Enter and verify it. While unzipping using the unzip command, you need to use the password. If the uncompressed file exists already in the dirrectory, it will ask several options like replace, rename, etc.

Password protect zip files