Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    changing the hostname

    Hi . I'm trying to change the hostname on my box because I'm having network troubles with machines running window's XP . seems xp defaults to "localhost " for their hostnames too. I've used
    "hostname -v new_host_name"
    and edited the etc/hosts file to read
    " new_host_name "
    but when I reboot everything reverts to localhost except of course there is no localhost in the etc/hosts file so I get an error(warning) on boot.
    Any Ideas ??
    Thanks in advance.

  2. #2
    Linux Engineer
    Join Date
    Sep 2003
    Knoxhell, TN
    you have to have localhost in your /etc/hosts file.. it's the same as having both and your LAN (local) IP address in /etc/hosts...

    to change your hostname, edit /etc/hostname
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  3. #3
    Thanks. If I had bothered to read some of the other posts on this site I wouldn't have had to ask the question. Sorry about that . I actually got around it by editing the netbios name in the samba.conf file . The whiney XP machines can see me now !
    Thanks again.

  4. $spacer_open
  5. #4

    Changing the host name

    You could have also edited this file:


    There should be a line in there that says:

    I had to change my hostname and I edited this file.

  6. #5

    I have problem in changing the hostname when I use this file : /etc/sysconfig/network, it doesn't give me the permition to save the edited file, what should I do to be able to save it?


  7. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    This thread is very old and unlikely to continue.
    Please open your own one

    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts