Displays or sets the name of the current Network Information Service (NIS) domain.
/usr/bin/domainname [ DomainName ]
The domainname command displays or sets the name of the current NIS domain. If you do not specify a parameter, the domainname command displays the name of the current NIS domain. A domain typically encompasses a group of hosts under the same administration.
Only the root user can set the name of the domain by giving the domainname command an argument.
domainname caesar
In this example, the domainname command sets the NIS domain name to caesar.domainname