Change Ubuntu Server DNS Config

علی ذوالفقار
1403/10/02 12:07:15 (4)
resolve.conf : 
sudo nano /etc/resolv.conf
	nameserver 8.8.8.8
	nameserver 8.8.4.4

netplan : sudo nano /etc/netplan/01-network-manager-all.yaml network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: no addresses: [192.168.157.140/24] gateway4: 192.168.157.140 nameservers: addresses: [ 8.8.8.8 , 8.8.4.4 ] sudo netplan apply
Verify the DNS Nameservers : sudo resolvectl status
resolvectl dns eth0 8.8.8.8 8.8.4.4 resolvectl domain eth0 my.domain.com (FOR TEST) : resolvectl
Back