At a terminal prompt, enter the following command to install dns:

sudo apt-get install bind9

A very useful package for testing and troubleshooting DNS issues is the dnsutils package. Very often these tools will be installed already, but to check and/or install dnsutils enter the following:

sudo apt-get install dnsutils