Find the answer to your Linux question:
Results 1 to 7 of 7
I am running Red Hat 8.0 with Gnome, and whenever I start up, it tells me to add a line to my /etc/hosts/ file or Gnome may not work correctly. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2003
    Posts
    5

    Told to edit /etc/hosts, but how?


    I am running Red Hat 8.0 with Gnome, and whenever I start up, it tells me to add a line to my /etc/hosts/ file or Gnome may not work correctly. Okay, so I find /etc/hosts, but I can't change a thing in it. How can I add a line to it?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You will need to be root to do that. Anyhow, before that, have you set a hostname for your computer other than localhost?

  3. #3
    Just Joined!
    Join Date
    Apr 2003
    Posts
    5
    Ah, yes, of course, root... how silly of me. And no, I have no other name besides localhost.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You should have set one during installation. Many programs (including the GNOME session manager) doesn't like that you don't have a real host name.
    Now after installation, you can set it in the file /etc/sysconfig/network. Then restart your networking with "service network restart". You'll need to be root for both of those to work.

  5. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    I think gnome also will complaine if it can´t resolv your hostname with dns if you have configured dns. That a little bit annoying but you can ignore it... thats what not the question but anyway...

    Regards
    Regards

    Andutt

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You sure? I think it just uses the gethostby*() calls.

  7. #7
    Just Joined!
    Join Date
    Apr 2003
    Posts
    20
    add this line to /etc/hosts (use the root account)

    (your hostname) localhost

    u can find out your hostname via the hostname command .

    i guess this should work properly .

    regards,
    Smokie

Posting Permissions

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