Mailinglist Archive: opensuse (1461 mails)

< Previous Next >
Re: [opensuse] hostname on command prompt is different than hostname in hostname/DNS tab under network settings in YAST
  • From: Anders Johansson <ajohansson@xxxxxxx>
  • Date: Sat, 23 May 2009 22:01:00 +0200
  • Message-id: <200905232201.00625.ajohansson@xxxxxxx>
On Saturday 23 May 2009 21:12:15 sundar mahadevan wrote:
1) I recently removed the localhost entry in /etc/hosts file Does it
have any impact on this issue.

No, but it will have an impact on just about everything else. Put it back! Why
on earth would you ever even think about removing that? You now have a broken
system

2) And btw, where does hostname on shell prompt retrieve its value from?

The kernel. As returned by the gethostname() system call.

Your problem means that you have changed your configuration but not yet told
the system about it. Update the info by

hostname <host name you want to use>

For your example, you would use

hostname sunny2

Anders
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References