2

hostname -A displays all FQDNs of the machine, according to the manual of hostname.

Here is my PC in local home net.

debian8@hwy:~$ hostname -A    
hwy 
debian8@hwy:~$ hostname -d    
local
debian8@hwy:~$ hostname -f
hwy.local

Why is the output info of hostname -A not hwy.local?
-A, --all-fqdns Displays,but hwy is not fqdn at all!!

1

No reverse DNS entry set?

-A, --all-fqdns Displays all FQDNs of the machine. This option enumerates all configured network addresses on all configured network interfaces, and translates them to DNS domain names. Addresses that cannot be translated (i.e. because they do not have an appropriate reverse DNS entry) are skipped. Note that different addresses may resolve to the same name, therefore the output may contain duplicate entries. Do not make any assumptions about the order of the output.

# man hostname

| improve this answer | |
  • -A, --all-fqdns Displays,but hwy is not fqdn!! – showkey Mar 4 '17 at 0:09
  • Not sure what you mean but here is some info from man page: "Therefore it depends on the configuration (usually in /etc/host.conf) how you can change it. Usually (if the hosts file is parsed before DNS or NIS) you can change it in /etc/hosts." regarding the FQDN. – impalle Mar 4 '17 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.