Linux Guest OS hostname change problems

Posted on

Linux Guest OS hostname change problems – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, windows, vmware-player, , .

I have redhat ES4 Linux guest os installed (windows xxp host).

I have changed the hostname in /etc/sysconfig/network from localhost:localdomain to another (FQDN) name. I have not altered anything in etc/hosts (still 127.0.0.1 localhost:localdomain locahost)

Then done system network restart and system config network.

However after this I can’t open a terminal session .

Looks like my xterminal session is screwed up somewhere – but don’t know how.

I’ve done a reboot and get the command line.

Thanks for your help

Solution :

Make sure you add this new hostname to your hosts file. If you don’t, then anything that relies on hostname <–> IP lookups (a surprisingly large amount of X windows, sudo, etc.) will fail when trying gethostbyname().

You can add another loopback entry in there, which is the right thing to do anyway so that
foo.baz.bar.com (or whatever FQDN you named your host), has an entry like:

127.0.0.1 localhost localhost.localdomain
127.0.0.1 foo foo.baz.bar.com 

Of course you can also join them all on one line as well.

Leave a Reply

Your email address will not be published.