DOKK / manpages / debian 10 / inetutils-tools / inetutils-dnsdomainname.1.en
DNSDOMAINNAME(1) User Commands DNSDOMAINNAME(1)

dnsdomainname - show DNS domain name

dnsdomainname [OPTION...]

Show domain part of the system's fully qualified host name.

The tool uses gethostname(2) to get the host name of the system and getaddrinfo(2) to resolve it into a canonical name. The part after the first period ('.') of the canonical name is shown.

-?, --help
Give this help list.
Give a short usage message.
Print program version.

gethostname(2), getaddrinfo(3)

2019-02 GNU inetutils