This file can be used to set the NIS/YP domainname in exactly the same way as the command domainname:

# echo "" > /proc/sys/kernel/domainname

However, NIS (Network Information Service) or YP (Yellow Pages) domainname are not to be confused with DNS (Domain Name System) domainname. These two domain names are in general different.

For a detailed discussion see the hostname(1) man page.