- **Epistemic status:** #budding
To decrypt a file with [[GPG]] there are two ways of doing it:
## Decrypting the file
The following command just decrypts the file, but does not extract its content.
```bash
gpg -d name-of-file.txt.gpg
```
After the file is decrypted, it will take 10 minutes for [[GPG]] to ask you for the password again. This is the default timeout value.
## Decrypting and extracting the files content
The following command will decrypt the file and extract the original version, keeping both the encrypted and decrypted versions.
```bash
gpg name-of-file.txt.gpg
```
---
## References
- “How to Encrypt and Decrypt Files Using GPG Command.” Accessed March 27, 2022. <https://linoxide.com/gpg-command-encrypt-decrypt-file/>.
- khess. “File Encryption and Decryption Made Easy with GPG.” Enable Sysadmin. Red Hat, Inc. Accessed March 27, 2022. <https://www.redhat.com/sysadmin/encryption-decryption-gpg>.
- Mckay, Dave. “How to Encrypt and Decrypt Files With GPG on Linux.” How-To Geek. Accessed March 27, 2022. <https://www.howtogeek.com/427982/how-to-encrypt-and-decrypt-files-with-gpg-on-linux/>.