Ubuntu Linux Configure DNS Name Server IP Address ( DNS Client )

Ubuntu Linux Configure DNS Name Server IP Address ( DNS Client )

To configure the DNS name server IP address on an Ubuntu Linux system (as a DNS client), you can follow these steps:

  1. Open the /etc/resolv.conf file in a text editor:
sudo nano /etc/resolv.conf
Sourc‮:e‬www.lautturi.com
  1. Add a line to the file specifying the DNS name server that you want to use. For example, to use the Google Public DNS servers (8.8.8.8 and 8.8.4.4), you can add the following lines to the file:
nameserver 8.8.8.8
nameserver 8.8.4.4
  1. Save the /etc/resolv.conf file and close the text editor.

The DNS name server IP address should now be configured on the system. You can verify the configuration by running the cat /etc/resolv.conf command, which should display the name servers that you configured.

Keep in mind that the /etc/resolv.conf file is overwritten by the Network Manager service when the network configuration is changed. If you want to make the DNS name server configuration persistent, you will need to configure it in the Network Manager settings instead.

To do this, you can use the nmcli command to set the DNS name servers for a specific network connection. For example, to set the Google Public DNS servers for the eth0 interface, you can use the following command:

sudo nmcli connection modify eth0 ipv4.dns "8.8.8.8 8.8.4.4"

This will set the DNS name servers for the eth0 interface to 8.8.8.8 and 8.8.4.4. The changes will be applied when the network connection is brought up.

Alternatively, you can use the NetworkManager.conf configuration file to set the DNS name servers for all network connections.

Created Time:2017-10-30 14:27:25  Author:lautturi