Ubuntu dig command not found - How to install dig on Ubuntu

Originally published at: https://www.cyberciti.biz/faq/ubuntu-dig-command-not-found-install-digonubuntu/

I deployed Ubuntu Linux minimal deployed in the cloud. However, I am unable to find the on my newly created Ubuntu 18.04 LTS server running on Google cloud. It says ‘-bash: dig: command not found’ I tried apt install dig command, but it failed. How do I install on Ubuntu Linux using the command line over ssh?