nmcli connection modify 'home' ipv4.dns 1.1.1.1

Category: Local Network & Public Hosting

nmcli connection modify 'home' ipv4.dns 1.1.1.1

Set the DNS server for a connection profile

This tells the profile to use 1.1.1.1, Cloudflare's public resolver, for name lookups instead of the router's DHCP-assigned server. Multiple servers are separated by commas, for example 1.1.1.1,8.8.8.8. The change takes effect after the profile is reactivated.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.