Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 12391  / 2 Years ago, mon, may 9, 2022, 2:33:12

When I installed Ubuntu I named my computer "test"



after the installation was finished, I renamed the hostname to somewhat nicer:



sudo hostname silversurfer


And I added the hostname to /etc/hosts



But still even after a reboot, in syslog all messages are preceeded by "test":



tail -f /var/log/syslog
Feb 24 04:51:28 test ntpd[4598]: peers refreshed
Feb 24 04:51:28 test ntpd[4598]: Listening on routing socket on fd #24 for interface updates
...


My /etc/hosts/ looks like this:



127.0.0.1   localhost
127.0.1.1 test silversurfer

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

More From » system

 Answers
0

I found out:



the first hostname for 127.0.1.1 in /etc/hosts is mentioned in syslog, so you have to change:



127.0.0.1   localhost
127.0.1.1 silversurfer test

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
...

[#26839] Tuesday, May 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
urnaetted

Total Points: 10
Total Questions: 113
Total Answers: 117

Location: Burundi
Member since Sat, Aug 21, 2021
3 Years ago
urnaetted questions
;