Update 'README.md'
This commit is contained in:
parent
f7898d555f
commit
217c924903
24
README.md
24
README.md
|
@ -61,3 +61,27 @@ Now, if we wanted to import a public key into your key ring we could use the fol
|
|||
```bash
|
||||
import_gpg "PUBLIC KEY"
|
||||
```
|
||||
|
||||
|
||||
### Listing keys in your ring
|
||||
|
||||
The following command could be used to list all the keys in your keyring.
|
||||
```
|
||||
gpg2 --list-keys
|
||||
```
|
||||
|
||||
### Listing keys and fingerprints
|
||||
Fingerprints are used to identify a user public key. It is a shorter hash that represents the public key.
|
||||
To list all the fingerprints and keys in your keyring the following command can be used.
|
||||
```
|
||||
gpg2 --fingerprint
|
||||
```
|
||||
You could also use grep with the command. This will allow you to search for certain usernames. Instead of giving you all the keys in your keyring this will only give you results that matches that patterned. Below is an example of the command that could be used.
|
||||
|
||||
```
|
||||
gpg2 --fingerprint | grep "Mr. Nakatomi"
|
||||
```
|
||||
|
||||
The `|` allows you chain the gpg2 command with grep so that grep can take the results of the output from the GPG2 command and use it to search for a username in keyring that matches `Mr. Nakatomi`
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue