nmcli d wifi list ifname wlan0 - I understand that this command returns a list of avaible networks for wlan0, but what exactly does the "d" do in the command? Because "nmcli wifi list ifname wlan0" doesn't work. If someone could break this down I would greatly appreciate it.

2 Answers 2


It means device as per --help:

  d[evice]        devices managed by NetworkManager

If you use man nmcli you'll get the man page for the tool.

I'll break it down a little for you:

nmcli d wifi list ifname wlan0
       nmcli [OPTIONS...] 
       {help | general | networking | radio | connection | device | agent | monitor}

      nmcli is a command-line tool for controlling NetworkManager and reporting network 

[OPTIONS...] will start with a - or --. In your case your d does not start with that, so the d is short for one of the {...} keywords. In this case, the only option is device. If we look at the device section of the man page, we see:

      nmcli device 
      {status | show | set | connect | reapply | modify | disconnect | delete | monitor | wifi | lldp}

       Show and manage network interfaces.

wifi in your command matches the next keyword. There are a few entries on wifi including wifi hotspot, wifi rescan, wifi connect, but your command uses wifi list. The entry on wifi list looks like this:

       wifi [list [--rescan | auto | no | yes] [ifname ifname] [bssid BSSID]]
           List available Wi-Fi access points. The ifname and bssid options can 
           be used to list APs for a particular interface or with a specific 
           BSSID, respectively.

So we can conclude that the command you wrote says:

  • nmcli - I want to control NetworkManager or report network status
  • d - I'm interested showing or managing a specific network interface (device)
  • wifi list ifname wlan0 - I want to list wifi access points visible to wlan0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .