FG
💻 Software

How to password protect gzip files on the command line?

Fresh7 days ago
Mar 15, 2026302954 views
Confidence Score1%
1%

Problem

I want to create some tar.gz (and possibly tar.bz2) files, using the tar command on Ubuntu 10.04. I want to password protect the file. What is the command to do this (I have Googled, but found nothing that shows how to create and extract compressed files using a password). Anyone knows how to do this?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to password protect gzip files on the command line?

Low Risk

You have to apply the Unix philosophy to this task: one tool for each task. Tarring and compression is a job for and or . Crypto is a job for either or : Encrypt Decrypt Or using gpg The variant uses symmetric encryption, you would have to tell the receiving party about the used 'password' (aka 'the key'). The variant uses a combination of symmetric and asymmetric encryption, you use the key of the receiving party (which means that you do not have to tell any password involved to anyone) to cre…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment