• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

servername change??

how can i change the annoying "localhost" server name?

and please give me an answer that works, not speculation or links to sites that i have to research.  i can do that myself.  thank you kindly.
1 Solution
nynexAuthor Commented:
Adjusted points to 65
In RedHat, the hostname is set in /etc/rc.d/rc.sysinit if you have no network.  If you have a network it is in /etc/sysconfig/network

You also might want to edit /etc/hosts

I suggest you leave as "localhost", but you can change the name associated with any IP address - especially the IP address of your Ethernet card(s).  The format of the file is as follows:


Example:  rhlinux.mystuff.com   rhlinux

If you have Redhat you need to edit two files:

/etc/HOSTNAME & /etc/sysconfig/network

Put the information in both places and when you reboot all will be well.

Also put an entry in your hosts file matching the hostname you pick.

Don't remove the localhost entry as bad things will happen.


Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now