How to get just 'domains:' from nmcli?

Andrei Borzenkov arvidjaar at gmail.com
Sat Dec 16 16:26:43 UTC 2023


On 16.12.2023 16:20, Chris Green wrote:
> I'm sorry this is a bit of a 'user' question but it's doubtful if I'll
> get an answer elsewhere I suspect.
> 
> When you run nmcli with no parameters you get, among other things a
> section like this:-
> 
>      DNS configuration:
>              servers: 1.1.1.1 8.8.4.4
>              domains: zbmc.eu
>              interface: enp0s25
> 
> I've read and re-read the man page for nmcli and I can't see how to
> get just the above information, can anyone tell me how to do it or
> point me at the right section of the man page please.
> 

Try

nmcli -g ip4.domain,ip4.searches,ip6.domain,ip6.searches device show xxx


More information about the Networkmanager mailing list