← 返回命令列表

Linux command

nmcli-agent 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

nmcli agent secret

Example

nmcli agent polkit

Example

nmcli agent all

说明

nmcli agent runs nmcli as an agent daemon that responds to NetworkManager's requests for secrets (passwords, keys) or polkit authorization requests. This is useful in environments without a desktop secret agent or polkit agent. As a secret agent, nmcli can provide Wi-Fi passwords, VPN credentials, and other secrets when NetworkManager needs them to establish connections. It prompts the user in the terminal for required credentials. As a polkit agent, nmcli handles authorization prompts for privileged NetworkManager operations, allowing command-line authentication without a graphical polkit agent.

参数

secret, s
Run as a NetworkManager secret agent to provide passwords/credentials
polkit, p
Run as a polkit agent to handle authorization requests
all, a
Run as both secret and polkit agent

FAQ

What is the nmcli-agent command used for?

nmcli agent runs nmcli as an agent daemon that responds to NetworkManager's requests for secrets (passwords, keys) or polkit authorization requests. This is useful in environments without a desktop secret agent or polkit agent. As a secret agent, nmcli can provide Wi-Fi passwords, VPN credentials, and other secrets when NetworkManager needs them to establish connections. It prompts the user in the terminal for required credentials. As a polkit agent, nmcli handles authorization prompts for privileged NetworkManager operations, allowing command-line authentication without a graphical polkit agent.

How do I run a basic nmcli-agent example?

Run `nmcli agent secret` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does secret, s do in nmcli-agent?

Run as a NetworkManager secret agent to provide passwords/credentials