This is more or less "how do I set a static IP"
Follow this answer for a similar question on Ubuntu 12.04 which is more or less identical in application.
The relevant bit is your Name server
How do I configure my DNS settings in Ubuntu server?
Though in keeping with many concerns of links relevant info from that question,
the correct file your looking for is
/etc/network/interfaces
and the part to modify should look similar to this
The primary network interface
auto eth0
iface eth0 inet static
address 192.168.X.X
netmask 255.255.255.0
gateway 192.168.X.X
dns-nameservers 1.1.1.1
This is the officially suggested method for changing/adding name servers from Ubuntu main help guides.
https://help.ubuntu.com/lts/serverguide/network-configuration.html#name-resolution
To configure the resolver, add the IP addresses of the nameservers that are appropriate for your network in the file /etc/network/interfaces.