dnsdomainname command in Linux with examples
Last Updated :
22 Jun, 2020
The DNS or the domain name system has many functions, primarily to convert IP addresses to the domain name and vice versa. Whenever we type a URL or a domain name of a website, its the DNS which converts it into IP addresses.
The command “dnsdomainname” shows the system’s dns domain name, i.e., the domain name of the localhost. The chances are unless we have a web server running on our computer, we will not have any dns domain name. By default, there is no web server running on a system and hence there is no result when we type “dnsdomainname” on the terminal and hit enter.
In case, while working with PHP (server-side language), web development, and others when we have a web server running on some system we get the DNS information with the help of this command or we can change the hostname manually (but it has no meaning in doing so).
To get more information about this command you can use the below option:
dnsdomainname --help
To read about options you can use the host command in Linux with examples
Share your thoughts in the comments
Please Login to comment...