Linux Get Domain Name Server. Host name is generally put in the etchostname file. Nslookup was depreciated years ago I was actually surprised to find that its still around.
Enter a domain name followed by the nslookup command to verify the A record IP address of the domain. Use the same format as above to find subdomain records information. How to setup nameserver in Red Hat.
Hostname OR hostnamectl OR cat procsyskernelhostname.
A hostname show or set the systems host name. It is part of DNS Domain name System. 1 How to Lookup a Domain A Record IP Address on Linux Using the host Command Use the host command followed by the domain name to find the given domain A record IP address. You need to open file etcresolvconf in a text editor like vi or nano and add your name server IP in the below format.