You are not logged in.
Pages: 1
I guess this belongs here, if not, mods, I apologize :)
I set up a Centos server and was browsing logfiles and noticed that instead of the usual 'localhost' string that I see in my Arch logs it had my hostname in all of the log files. After a little digging I found this on the Debian forum. I've edited my /etc/hosts how the post describes and lo and behold, after restarting syslog-ng, I get my pretty hostname in my logs. My question is, this runs contrary to how the Beginners Guide directs to set up that file and contrary to how the Arch installer sets up /etc/hosts. Did I just mess something up or is this an oversight? I didn't want to go editing wiki pages not knowing for sure. It seems like everything is running just fine on my machine now.
For reference, here is how my /etc/hosts was:
127.0.0.1 localhost.localdomain localhost archdesk
This is how it is now
127.0.0.1 archdesk localhost
Thanks.
Offline
The hosts file has three parts on each line. First is the ip, second the canonical (full) hostname and the third part is an optional list of aliases. In your old situation this means that the first alias (which was used for the logfile) was localhost.
With either:
127.0.0.1 localhost.localdomain archdesk localhost
or:
127.0.0.1 archdesk.localdomain archdesk localhost
I would expect you get the desired behaviour (not 100% sure though).
Read
man hosts
to learn more.
Offline
The new version is incorrect. I don't think it's going to cause any immediate problems, though.
localhost should point to your loopback address
archdesk can point to your interface address (192.168.0.1 or whatever it is)
Offline
do something like
127.0.0.1 localhost.localdomain localhost
127.0.0.1 Alice.zomgnet Alice
and just replace the names in the second line with what host/domain you want
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Excellent! Thanks for the great responses, I'll dig into the man file and do some fiddling when I get a chance today.
Guess this means that the 4 part hosts file that the wiki shows is incorrect too? I can imagine thousands with improperly configured hosts files.
Offline
Pages: 1