Is my $(getent hosts) messed up?

127.0.0.1 localhost
127.0.0.2 ne-1-26.stegny.2a.pl ne-1-26
192.168.0.1 linux-075r.site linux-075r
10.8.1.26 ne01026.stegny.2a.pl linux-075r

I am worried about that. { getent hosts $(hostname); } prints only 127.0.0.2. Is it normal, or am I in a mess?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If $(hostname} returns either ne-1-26.stegny.2a.pl or ne-1-26 then that
sounds like it is working properly. If you would rather it return
something less local-only be sure that the hostname returned by the
‘hostname’ command is mapped in /etc/hosts to something like 192.* or
10.* (based on what you posted). There is an option in Yast (sudo /sbin/yast lan) which assigns your hostname to your localhost address
explicitly, which is probably what is causing what you see below, but
besides that the names assigned to 127.0.0.2 and the one assigned to
10.8.1.26 are not the same, though they are similar.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPTiuyAAoJEF+XTK08PnB5LWMP/3h8zddC96f1CgRD43oldFOI
5goRW75D1d/gsJQwg+p2Mq8w4JoQH3qlp+dDSysBcn3t4pade9H5Y8PI0tI/1WEQ
OxhXtTElu3nySi1efFodh88EXeWEk0zceataBQ+64lFd/tfJdLB1aefNiEvhQB04
BH7C9RlDM8rJEERtdGWTaiE/CT/mcx8cqqA8wHXPXNJCo+KsuGQnkpiKRtVrsjxn
Xy5j2lP+meHjRRlr+b6Epex8fkdcHgbWsSw7if5bIevBDRqUNjNNXLK3uQd9udhy
17dhqSXaDgH/7xCfzOX7liANDXSz7+R/iDOMGjAQPAC2BJhQPPyUoZF3s5oFHp8H
nW72khOyyajc9r5kACOAmvNOikfyVgz/oBtM9/+6rDsrerK3nrdqWLAeIftrfezJ
Nhh/FIEnxK2gBsJuThb6VgqWcdrztGgc6Ta5h8UwyRYpt2hRovH+T3lb1MmKc4DG
jZGmpLhvZXpMXLf/qDP22NffEKcMHI+ZE/oR8EgWmnblT4rmZqpZeuvImWyg+eX7
ZtP4sZ0IFicaEIOpIZB0rapSWb0anKAJO0e/yqTx+LB0DX5v/fWcgpUBLsMnqriG
ncq+hLFKWjlkyUwXw5dyT23mAmAwE29KgAjcO6SXwjheCmdTcADjm/0zr+v/uYEK
W5U3CqJ70oaLRJjljEGO
=jhBz
-----END PGP SIGNATURE-----

IMO it’s not important as long as each name is resolved correctly.

By “correctly” any 127.0.0 x should resolve to the local machine, so if “ne-1-26.stegny.2a.pl” and “ne-1-26” and “localhost” are all names that should point to your machine you should be OK. Both “ne-1-26.stegny.2a.pl” and “ne-1-26” are typical of names assigned by an Internet Service Provider identifying your specific Internet connection.

TS