Quantcast
Channel: How to manage DNS in NetworkManager via console (nmcli)? - Server Fault
Viewing all articles
Browse latest Browse all 5

How to manage DNS in NetworkManager via console (nmcli)?

$
0
0

I have CentOS 7.2 (guest in VirtualBox, vagrant box centos/7, no GUI).

I see there is a nameserver in file:

$ cat /etc/resolv.conf# Generated by NetworkManagernameserver 10.0.2.3

But how to add or replace with new one?

I have done this manually directly in the network:

$ vi /etc/sysconfig/network-scripts/ifcfg-eth0PEERDS=noDNS1=8.8.4.4DNS2=8.8.8.8

And it works.

But is there any way to do this through nmcli?

P.S. No nmtui installed (in a selected system).


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>