LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   how do i change my host name? (http://www.linuxquestions.org/questions/debian-26/how-do-i-change-my-host-name-236289/)

jsmarshall85 09-28-2004 02:33 PM

how do i change my host name?
 
how do i change my host name?

Electronkz 09-28-2004 02:49 PM

edit /etc/sysconfig/network And change the HOSTNAME to whatever you want
read the comments(#).
Just add the new name in the 127.0.0.1 line ## dont delete the other names!!!!!

Dead Parrot 09-28-2004 03:09 PM

One trick you can use to search for info on such basic operations as setting the hostname is to use the man command with a keyword option. "man -k hostname" will give you a list of manpages relevant to the keyword "hostname".

jsmarshall85 09-28-2004 03:49 PM

Quote:

Originally posted by Electronkz
edit /etc/sysconfig/network
that file doesnt exist on debian

however i did find the hosts and hostname file in /etc and edited those and rebooted. hostname changed

thanks Dead Parrot for the pointer on the man pages. i really need to read a tutorial on using man pages sometime. i know they are there, but dont know how to use them effeciently.

bglnelissen 10-19-2004 04:17 AM

# hostname 'the hostname you want'

check with:

# hostname


(nice and fast)

macondo 10-19-2004 10:15 AM

"however i did find the hosts and hostname file in /etc and edited those and rebooted. hostname changed"

Please give the file name so the rest of us know how you did it. I looked superficially at the /etc, and did not see any host or hostname entry. This way everybody will benefit. Thanks

Edit: for example,

/etc/hostname

zuralin 10-19-2004 02:35 PM

I have an /etc/hostname file on my box, which contains my hostname

jsmarshall85 10-19-2004 03:04 PM

Quote:

Originally posted by macondo
Please give the file name so the rest of us know how you did it. I looked superficially at the /etc, and did not see any host or hostname entry. This way everybody will benefit. Thanks

Edit: for example,

/etc/hostname

i did, i said "however i did find the hosts and hostname file in /etc and edited those and rebooted. hostname changed"
the two files i found are called hosts and hostname in the /etc directory


All times are GMT -5. The time now is 03:12 PM.