Get network parameters NetworkManager CLI

The nmcli program gives access to current network parameters on many Linux distros. For example, to get current DNS server:

nmcli dev show | grep DNS

This returns something like:

IP4.DNS[1]:                             1.1.1.1
IP6.DNS[1]:                2606:4700:4700::1111

NMCLI output is made for machine parsing. An example of nmcli Python parsing is Python WiFi scanning.