Open In App

domainname Command in Linux With Examples

domainname command in Linux is used to return the Network Information System (NIS) domain name of the host. You can use hostname -d command as well to get the host domainname. If the domain name is not set up in your host then the response will be “none”.
In the networking terminology, the domain name is the mapping of IP with the name. Domain names are registered in the DNS server in case of a local network. If the DNS server is not present you can put the entry in /etc/hosts file to map IP address with the domain name.

Syntax:



domainname [options]

Options:

Other Useful Options:

Article Tags :