LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   hostname changes after setup internet (https://www.linuxquestions.org/questions/linux-general-1/hostname-changes-after-setup-internet-83517/)

spchehe 08-19-2003 11:07 AM

hostname changes after setup internet
 
Hi

I've just installed RH 9.0 and setup my cable modem, but after I restarted the computer and login in as root, it said "

Could not look up internet address for x1-6-00-08-74-c4-xx. This will prevent GNOME from operating correctly. It may be possible to correct the problem by adding x1-6-00-08-74-c4-xx to file /etc/hosts."

And after that my terminal host name changed to root@x1-6-00-08-74-c4-xx. Can anyone tell me how to change it to root@Red Hat Linux?

Thanks

Mathieu 08-19-2003 12:16 PM

To give your system a hostname,
add it to the HOSTNAME line in /etc/sysconfig/network

You will need to restart your network and logout for the changes to take effect.

spchehe 08-19-2003 12:44 PM

still not working
 
Hi

Thanks for the quick reply, but after I changed it to:

NETWORKING=yes
HOSTNAME=localhost.local.domain Red Hat Linux

and restarted the machine the message(Could not look up internet address...) appeared again and in the terminal it still displayed
root@x1-6-00-08-74-c4-xx root

Mathieu 08-19-2003 12:56 PM

The line in /etc/sysconfig/network should look like this:
Code:

HOSTNAME=Red_Hat_Linux
Then in /etc/hosts, append the name to the end of the first line like this:
Code:

127.0.0.1      localhost.localdomain  localhost Red_Hat_Linux

spchehe 08-19-2003 02:11 PM

it worked, thanks!


All times are GMT -5. The time now is 07:00 AM.