Why 'hostname -a' command is not showing all the host aliases mentioned in '/etc/hosts' file ?
Issue
/etc/hsots
is configured as below:
[...]
155.176.X.X USxxx-APPxxxx0 USxxx-APPxxxx0.emxx.org
155.176.Y.Y USxxx-APPxxxx1 USxxx-APPxxxx1.emxx.org
155.176.X.X xx0 xx0.emxx.org <<----
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
hostname -a
is returning hostname like below:
# hostname -a
USxxx-APPxxxx0.emxxx.org
- why is not returning
xx0
andxx0.emxx.org
as well inhostname -a
list ?
Environment
- Red Hat Enterprise Linux (Any Version)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.