Linux command
add-apt-key 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Add
sudo add-apt-key [KEY_ID]
Add
sudo add-apt-key -k [keyserver.ubuntu.com] [KEY_ID]
Add
sudo add-apt-key -v [KEY_ID]
说明
add-apt-key requests the specified GPG key from a public keyserver and inserts it into the APT keyring so that archives signed with that key will be trusted. The default keyserver can be configured in /etc/default/add-apt-key.
参数
- -h, --help
- Show usage information.
- -v, --verbose
- Verbose mode; show each command before it is executed.
- -k, --keyserver _name_
- Select a specific keyserver to use.
FAQ
What is the add-apt-key command used for?
add-apt-key requests the specified GPG key from a public keyserver and inserts it into the APT keyring so that archives signed with that key will be trusted. The default keyserver can be configured in /etc/default/add-apt-key.
How do I run a basic add-apt-key example?
Run `sudo add-apt-key [KEY_ID]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -h, --help do in add-apt-key?
Show usage information.