Reference

dnsdomainname(1)

show DNS domain name

NAME

dnsdomainname - show DNS domain name

SYNOPSIS

dnsdomainname [OPTION...]

DESCRIPTION

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

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

-?, --help

give this help list

--usage

give a short usage message

-V, --version

print program version

AUTHOR

Written by Simon Josefsson.

REPORTING BUGS

Report bugs to <[email protected]>.

COPYRIGHT

Copyright © 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

gethostname(2), getaddrinfo(3)

The full documentation for dnsdomainname is maintained as a Texinfo manual. If the info and dnsdomainname programs are properly installed at your site, the command

info dnsdomainname

should give you access to the complete manual.

History

--usage since Arch Linux 2026-11-01; -? since Arch Linux 2026-11-01.

--alias until Debian 13 (Trixie); --all-fqdns until Debian 13 (Trixie); --all-ip-addresses until Debian 13 (Trixie); --boot until Debian 13 (Trixie); --domain until Debian 13 (Trixie); --file until Debian 13 (Trixie); --fqdn until Debian 13 (Trixie); --ip-address until Debian 13 (Trixie); --long until Debian 13 (Trixie); --nis until Debian 13 (Trixie); --short until Debian 13 (Trixie); --verbose until Debian 7 (Wheezy); --yp until Debian 13 (Trixie); -A until Debian 13 (Trixie); -F until Debian 13 (Trixie); -I until Debian 13 (Trixie); -a until Debian 13 (Trixie); -b until Debian 13 (Trixie); -d until Debian 13 (Trixie); -f until Debian 13 (Trixie); -h until Debian 13 (Trixie); -i until Debian 13 (Trixie); -s until Debian 13 (Trixie); -v until Debian 7 (Wheezy); -y until Debian 13 (Trixie).