-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux gpg Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to gpg on Linux, covering Arch Linux, CachyOS, and other distributions including encryption, digital signatures, key management, and secure communication.
Arch/CachyOS:
# Install GnuPG
sudo pacman -S gnupgDebian/Ubuntu:
sudo apt install gnupgFedora:
sudo dnf install gnupgCreate keypair:
# Generate key
gpg --full-generate-key
# Follow promptsShow keys:
# List keys
gpg --list-keys
# Shows public keys
gpg --list-secret-keys
# Shows private keysExport public key:
# Export public key
gpg --export -a "Your Name" > public.key
# -a = ASCII armorImport key:
# Import public key
gpg --import public.key
# Imports keyEncrypt file:
# Encrypt file
gpg -e -r "Recipient" file.txt
# -e = encrypt
# -r = recipientSign file:
# Sign file
gpg --sign file.txt
# Creates file.txt.gpgCheck installation:
# Check gpg
which gpg
# Install if missing
sudo pacman -S gnupgThis guide covered gpg usage, encryption, signing, and key management for Arch Linux, CachyOS, and other distributions.
- Package Signing - Package verification
- Security Configuration - Security setup
-
gpg Documentation:
man gpg
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.