Description of problem: Using just about any option with hostname(1) results in "unknown host" message. Version-Release number of selected component (if applicable): net-tools-1.60-84.fc8 How reproducible: always Steps to Reproduce: 1. execute 'hostname' command w/ just about any option 2. 3. Actual results: [don@steinbeck ~]$ arglist="-v -s --short -a --alias -i --ip-address -f --fqdn --long -d --domain -y --yp --nis" [don@steinbeck ~]$ for a in $arglist ; do echo "% hostname $a" ; hostname $a ; done % hostname -v gethostname()=`steinbeck.corp.imoveinc.com' steinbeck.corp.imoveinc.com % hostname -s hostname: Unknown host % hostname --short hostname: Unknown host % hostname -a hostname: Unknown host % hostname --alias hostname: Unknown host % hostname -i hostname: Unknown host % hostname --ip-address hostname: Unknown host % hostname -f hostname: Unknown host % hostname --fqdn hostname: Unknown host % hostname --long hostname: Unknown host % hostname -d hostname: Unknown host % hostname --domain hostname: Unknown host % hostname -y (none) % hostname --yp (none) % hostname --nis (none) [don@steinbeck ~]$ Expected results: I expected not to get error messages. Additional info:
Hello, the reason why hostname ends with "hostname: Unknown host" is that probably you have something wrong configured. In my opinion this is not a bug in hostname. Furthermore, I didn't manage to reproduce this bug on any PC that I have (hostname works fine with all options on all PC). You can try to run hostname with -v option. It enables verbose mode and you can find where a bug is.