Forrest logo
tool overview
On this page you find all important commands for the CLI tool nmcli. If the command you are looking for is missing please ask our AI.

nmcli

nmcli is a command-line tool used for managing and configuring network-related settings in Linux-based operating systems, primarily NetworkManager. It allows users to interact with NetworkManager without needing a graphical user interface.

With nmcli, users can view information about network connections, including Ethernet, Wi-Fi, and mobile broadband devices. It provides details such as device status, IP addresses, DNS settings, and network speeds.

Users can also edit and configure network settings through nmcli. This includes creating or modifying network connections, enabling or disabling devices, setting up Wi-Fi hotspots, assigning IP addresses, configuring DNS servers, and managing connection priorities.

nmcli supports various network protocols like IPv4 and IPv6, and it also supports NetworkManager plugins for specific networking technologies such as VLANs, bridging, and bonding.

Furthermore, nmcli supports scripting and automation by providing options to execute nmcli commands directly or by referring to configuration files. This allows for easy integration with shell scripts or other automation tools.

nmcli is a versatile tool for network management, making it a preferred choice for system administrators, network engineers, and power users who primarily work on Linux command-line environments without a GUI.

List of commands for nmcli:

  • nmcli-agent:tldr:316cb nmcli-agent: Register nmcli as a secret agent and listen for secret requests.
    $ nmcli agent secret
    try on your machine
    explain this command
  • nmcli-agent:tldr:99331 nmcli-agent: Register nmcli as a polkit agent and listen for authorization requests.
    $ nmcli agent polkit
    try on your machine
    explain this command
  • nmcli-agent:tldr:a3447 nmcli-agent: Register nmcli as a secret agent and a polkit agent.
    $ nmcli agent all
    try on your machine
    explain this command
  • nmcli-connection:tldr:28346 nmcli-connection: Deactivate a connection.
    $ nmcli connection down uuid ${uuid}
    try on your machine
    explain this command
  • nmcli-connection:tldr:2990a nmcli-connection: Create an auto-configured dual stack connection.
    $ nmcli connection add ifname ${interface_name} type ${ethernet} ipv4.method ${auto} ipv6.method ${auto}
    try on your machine
    explain this command
  • nmcli-connection:tldr:3c624 nmcli-connection: Create a static IPv6-only connection.
    $ nmcli connection add ifname ${interface_name} type ${ethernet} ip6 ${2001:db8::2-64} gw6 ${2001:db8::1} ipv6.dns ${2001:db8::1} ipv4.method ${ignore}
    try on your machine
    explain this command
  • nmcli-connection:tldr:793ef nmcli-connection: Create a VPN connection using OpenVPN from a OVPN file.
    $ nmcli connection import type ${openvpn} file ${path-to-vpn_config-ovpn}
    try on your machine
    explain this command
  • nmcli-connection:tldr:7bb58 nmcli-connection: List all NetworkManager connections (shows name, UUID, type and device).
    $ nmcli connection
    try on your machine
    explain this command
  • nmcli-connection:tldr:af139 nmcli-connection: Create a static IPv4-only connection.
    $ nmcli connection add ifname ${interface_name} type ${ethernet} ip4 ${10-0-0-7-8} gw4 ${10-0-0-1} ipv4.dns ${10-0-0-1} ipv6.method ${ignore}
    try on your machine
    explain this command
  • nmcli-connection:tldr:c6c5d nmcli-connection: Activate a connection by specifying a UUID.
    $ nmcli connection up uuid ${uuid}
    try on your machine
    explain this command
  • nmcli-device:tldr:14d02 nmcli-device: Print the available Wi-Fi access points.
    $ nmcli device wifi
    try on your machine
    explain this command
  • nmcli-device:tldr:2bb17 nmcli-device: Print password and QR code for the current Wi-Fi network.
    $ nmcli device wifi show-password
    try on your machine
    explain this command
  • nmcli-device:tldr:2ef35 nmcli-device: Print the statuses of all network interfaces.
    $ nmcli device status
    try on your machine
    explain this command
  • nmcli-device:tldr:edd3e nmcli-device: Connect to the Wi-Fi network with a specified name and password.
    $ nmcli device wifi connect ${ssid} password ${password}
    try on your machine
    explain this command
  • nmcli-general:tldr:056b1 nmcli-general: Show the permissions of NetworkManager.
    $ nmcli general permissions
    try on your machine
    explain this command
  • nmcli-general:tldr:05d4b nmcli-general: Set the logging level and/or domains (see `man NetworkManager.conf` for all available domains).
    $ nmcli general logging level ${select} domain ${domain_1,domain_2,---}
    try on your machine
    explain this command
  • nmcli-general:tldr:09bb1 nmcli-general: Show the general status of NetworkManager.
    $ nmcli general
    try on your machine
    explain this command
  • nmcli-general:tldr:40d1f nmcli-general: Show the hostname of the current device.
    $ nmcli general hostname
    try on your machine
    explain this command
  • nmcli-general:tldr:92d21 nmcli-general: Show the current logging level and domains.
    $ nmcli general logging
    try on your machine
    explain this command
  • nmcli-general:tldr:df182 nmcli-general: Change the hostname of the current device.
    $ sudo nmcli general hostname ${new_hostname}
    try on your machine
    explain this command
  • nmcli-monitor:tldr:f2ec3 nmcli-monitor: Start monitoring NetworkManager changes.
    $ nmcli monitor
    try on your machine
    explain this command
  • nmcli-networking:tldr:5922f nmcli-networking: Enable or disable networking and all interfaces managed by NetworkManager.
    $ nmcli networking ${select}
    try on your machine
    explain this command
  • nmcli-networking:tldr:7fa89 nmcli-networking: Show the last known connectivity state.
    $ nmcli networking connectivity
    try on your machine
    explain this command
  • nmcli-networking:tldr:d531b nmcli-networking: Show the current connectivity state.
    $ nmcli networking connectivity check
    try on your machine
    explain this command
  • nmcli-networking:tldr:e8568 nmcli-networking: Show the networking status of NetworkManager.
    $ nmcli networking
    try on your machine
    explain this command
  • nmcli-radio:tldr:12cc2 nmcli-radio: Show status of Wi-Fi in NetworkManager.
    $ nmcli radio wifi
    try on your machine
    explain this command
  • nmcli-radio:tldr:1d984 nmcli-radio: Turn both switches on or off in NetworkManager.
    $ nmcli radio all ${select}
    try on your machine
    explain this command
  • nmcli-radio:tldr:2b037 nmcli-radio: Turn WWAN on or off in NetworkManager.
    $ nmcli radio wwan ${select}
    try on your machine
    explain this command
  • nmcli-radio:tldr:7d8a2 nmcli-radio: Show status of both switches in NetworkManager.
    $ nmcli radio all
    try on your machine
    explain this command
  • nmcli-radio:tldr:a9769 nmcli-radio: Show status of WWAN in NetworkManager.
    $ nmcli radio wwan
    try on your machine
    explain this command
  • nmcli-radio:tldr:c440a nmcli-radio: Turn Wi-Fi on or off in NetworkManager.
    $ nmcli radio wifi ${select}
    try on your machine
    explain this command
  • nmcli:tldr:7e6f5 nmcli: Display help for a subcommand.
    $ nmcli ${subcommand} --help
    try on your machine
    explain this command
  • nmcli:tldr:97720 nmcli: Run an `nmcli` subcommand.
    $ nmcli ${select} ${command_options}
    try on your machine
    explain this command
  • nmcli:tldr:99a57 nmcli: Display help.
    $ nmcli --help
    try on your machine
    explain this command
  • nmcli:tldr:f4f68 nmcli: Display the current version of NetworkManager.
    $ nmcli --version
    try on your machine
    explain this command
tool overview