Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What distro/version are you using and what version of hostname is installed?
By the way, hostname has been around for a long time. It's highly unlikely that you will get an answer to your "why" question that's other than some variation on "because they wrote it that way." In writing programs, sometimes authors must make arbitrary decisions that make sense to them, but the reasons for the decisions are not readily apparent to others.
$> hostname -A
hostname: invalid option -- 'A'
Try 'hostname --help' or 'hostname --usage' for more information.
$> hostname --version
hostname (GNU inetutils) 1.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
that's from my archlinux system, but my debian system has the -A option.
it returns an empty string.
which is strange, because 'hostname -fqdn' returns 'localhost'.
$> hostname -A
hostname: invalid option -- 'A'
Try 'hostname --help' or 'hostname --usage' for more information.
$> hostname --version
hostname (GNU inetutils) 1.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
that's from my archlinux system, but my debian system has the -A option.
it returns an empty string.
which is strange, because 'hostname -fqdn' returns 'localhost'.
i forgot to mention what -A is supposed to do:
Code:
-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 IP 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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.