Encryption commands GPG and KEY in Ubuntu

Source: Internet
Author: User
1. GPG (GNUprivacyguard) can use the GPG command under UbuntuLinux to encrypt and decrypt files. Basically, each release of GPG is pre-installed. If you want to encrypt the file named secret.txt: #gpg-csecret.txt, the pop-up dialog box will pop up automatically asking for the encryption password: After two input passwords are confirmed, secret.txt. gpg will be generated under the directory. This is the encrypted file. Do not

1. GPG (GNU privacy guard)
In Ubuntu Linux, you can use the GPG command to encrypt and decrypt files. Basically, each release of GPG is pre-installed.

Assume that the file name you want to encrypt is secret.txt:

# Gpg-c secret.txt

The pop-up dialog box will pop up asking for the encrypted password:

After two passwords are entered, secret.txt. gpg is generated in the directory. This is the encrypted file. Do not forget to delete the original file ~

Decryption:

# Gpg secret.txt. gpg

Input the secret password, and secret.txt will be generated again in the current directory.

Sometimes we need to add a signature when installing the software and download an encrypted file, such as the steps for installing wine:

1. Add the latest wine source for Ubuntu gutsy:
Wget-q http://wine.budgetdedicated.com/apt/387EE263.gpg-O-| sudo apt-key add-

2. Obtain the apt list of Wine for Gutsy.
Sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/gutsy.list-O/etc/apt/sources. list. d/winehq. list

3. update and upgrade references:
Sudo apt-get update
Sudo apt-get dist-upgrade

4. Install wine
Sudo apt-get install wine

Ii. apt-key command:
Apt-key is the security management tool of the Debian software package. Each released deb package passes key authentication, and apt-key is used to manage the key.

Apt-key list
Lists keys saved in the system.

Apt-key add keyname
Add the downloaded key to the local trusted database.
 
Apt-key del keyname
Delete keys from the local trusted database.
 
Apt-key update
Update the local trusted database and delete expired keys that are useless.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.