LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   changing host name (https://www.linuxquestions.org/questions/linux-newbie-8/changing-host-name-236618/)

scng 09-29-2004 08:19 AM

changing host name
 
my linux box is now having the name "localhost"
how to change the host name?
and how to make the host name be ping from other machine?

scuzzman 09-29-2004 08:25 AM

Try searching for this topic? It has been covered many times.
May want to specifically look at this thread.

scng 09-29-2004 09:19 AM

thnx anyway

sbrewer 09-29-2004 10:01 AM

You can change the host name by modifying the /etc/sysconfig/network file. Change the line HOSTNAME=<your_host_name>. That should do it.

scng 10-01-2004 11:59 PM

excuse me, i have exec the hostname cmd (my proposed name is "neozeon"): hostname neozeon, amended /etc/sysconfig/network with

HOSTNAME=neozeon

and rebooted the machine

however i still cant ping the host neozeon from a client comp, the client said: unknown host, but i can ping with neozeon's ip.

chrism01 10-02-2004 08:00 AM

You need to add an entry to
/etc/hosts
with the name and ip address. Just follow the entry for localhost which is already there. (You need to be root for this).

scng 10-02-2004 10:48 PM

ah...... i should amend my question that i even cant ping 192.168.0.1 at 192.168.0.1?!

there should be sth else wrong.

scng 10-02-2004 11:33 PM

i should add sth to my question. i guess the "iptable" has forbidden ping, but, i dun know how to check.

SimonT 10-03-2004 12:16 AM

Are you allowed to give your machine a TLD extension eg mypc.com I have a dns entry for the machien as mypc.com on my inturnal network butin my networking control pannel it would not allow me to add .com after the name can I hack the /etc/sysconfig/network file and set it there ?

happen23 10-03-2004 01:04 AM

run this
hostname yourname

scuzzman 10-03-2004 06:36 AM

Quote:

Originally posted by scng
i should add sth to my question. i guess the "iptable" has forbidden ping, but, i dun know how to check.
issue this command sequence to shut down iptables:
Code:

$ su -
Password:
# service iptables stop



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