This version of hostname allows to show the FQDN (-f), DNS domain name (-d, dnsdomainname), alias names (-a, -A) or network addresses (-i, -I). Works reasonably on Cygwin.
It is a slightly patched version of hostname 3.12 from Debian unstable which is at least also used on Fedora.
http://packages.debian.org/unstable/hostnameThe packages below are intended for testing. Command and man page are installed as "hostname-linux" with the usual symlinks "domainname" and "dnsdomainname". This should keep hostname from coreutils intact.
wget -r -nH --cut-dirs=2 \http://franke.dvrdns.org/cygwin/release/hostname/hostname-3.12-1-src.tar.bz2 \
http://franke.dvrdns.org/cygwin/release/hostname/hostname-3.12-1.tar.bz2 \http://franke.dvrdns.org/cygwin/release/hostname/hostname-debuginfo/hostname-debuginfo-3.12-1.tar.bz2 \ http://franke.dvrdns.org/cygwin/release/hostname/hostname-debuginfo/setup.hint \
http://franke.dvrdns.org/cygwin/release/hostname/setup.hint 64bit: wget -r -nH --cut-dirs=2 \http://franke.dvrdns.org/cygwin/release/64bit/hostname/hostname-3.12-1-src.tar.bz2 \ http://franke.dvrdns.org/cygwin/release/64bit/hostname/hostname-3.12-1.tar.bz2 \ http://franke.dvrdns.org/cygwin/release/64bit/hostname/hostname-debuginfo/hostname-debuginfo-3.12-1.tar.bz2 \ http://franke.dvrdns.org/cygwin/release/64bit/hostname/hostname-debuginfo/setup.hint \
http://franke.dvrdns.org/cygwin/release/64bit/hostname/setup.hint ChristianPS: /usr/lib/gettext/hostname from gettext-devel is another hostname variant supporting -f and -i