Files
org_roam/Linux/20250516161728-gpg_encryption.org
Zaine 5e983f43d4
All checks were successful
Build Roam Site / build (push) Successful in 28s
gitea runners 2
2026-05-06 15:42:32 +01:00

844 B
Raw Blame History

gpg-encryption

If you want to encrypt a file, use the following command:

  gpg -c file.txt

  # options include :
  # gpg -c file.txt : for symmetric encryption
  # gpg -d file.txt.gpg : to decrypt the file
  # gpg --batch -c --passphrase mypassphrase file.txt : accepts passphrase right from command line

and to decrypt, use:

  gpg -d file.txt

  # You have to wait 10 minutes before you can get prompted for a password, before this, it will
  # decrypt without the passphrase.

gpg batch -c passphrase Shakkal123! passwords.md

gpg batch -d passphrase Shakkal123! passwords.md.gpg

gpg batch output passwords.md -d passphrase Shakkal123! passwords.md.gpg