• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

nmcli agent Command Examples in Linux

by Deepika

nmcli is a command line interface tool for managing NetworkManager, which is a network management service in many Linux distributions. The agent subcommand of nmcli allows it to act as a NetworkManager secret agent or a polkit agent.

As a NetworkManager secret agent, nmcli is used to store and retrieve secrets such as passwords and encryption keys for network connections managed by NetworkManager. This is useful for automating tasks and scripts that need to interact with NetworkManager.

As a polkit agent, nmcli can be used to perform actions that require elevated privileges, such as enabling or disabling network connections. Polkit is a component that provides a centralized way of managing authorizations in a system. When nmcli is used as a polkit agent, it allows the user to authenticate with the polkit system and perform privileged operations without having to use the sudo command.

nmcli agent Command Examples

1. Register nmcli as a secret agent and listen for secret requests:

# nmcli agent secret

2. Register nmcli as a polkit agent and listen for authorization requests:

# nmcli agent polkit

3. Register nmcli as a secret agent and a polkit agent:

# nmcli agent all

Filed Under: Linux

Some more articles you might also be interested in …

  1. 14 Useful “cat” Command Examples in Linux
  2. squeue: command not found
  3. Encrypted vSphere vMotion
  4. gacutil: Global Assembly Cache (CAG) management utility
  5. docsify: Initialize and serve markdown documentation
  6. “aws sqs” Command Examples
  7. htpasswd Command Examples
  8. arduino-builder: A command-line tool for compiling arduino sketches
  9. ndctl Command Examples in Linux
  10. st Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright