Results 1 to 7 of 7

Thread: Unable to resolve host

  1. #1
    Join Date
    Oct 2008
    Location
    New York
    Beans
    2,649
    Distro
    Ubuntu 12.04 Precise Pangolin

    Unable to resolve host

    Hey everyone, i am having a problem in the terminal window. When i try to do various operations i get the following message before the operation starts.

    sudo: unable to resolve host Tims-Laptop

    Any ideas as to a cure?
    My Launchpad
    ----------------------------------------------------------------------------------------
    My Wiki Page

  2. #2
    Join Date
    Jan 2009
    Beans
    Hidden!

    Re: Unable to resolve host

    If your /etc/hostname file contains the name 'Tims-Laptop', then there should be an entry for Tims-Laptop in your /etc/hosts file, too, as in:
    Code:
    127.0.1.1 Tims-Laptop
    This will allow the hostname to be resolved to a localhost address.

  3. #3
    Join Date
    Oct 2008
    Location
    New York
    Beans
    2,649
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Unable to resolve host

    Thanks for that.......using your idea one thing led to another and I found the problem.

    Turns out you cant have a hostname with capitals in it. Problem solved.
    My Launchpad
    ----------------------------------------------------------------------------------------
    My Wiki Page

  4. #4
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Unable to resolve host

    Quote Originally Posted by RedSingularity View Post
    Problem solved.
    This kind of solved?
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  5. #5
    Join Date
    Jan 2009
    Beans
    Hidden!

    Re: Unable to resolve host

    Quote Originally Posted by RedSingularity View Post
    Turns out you cant have a hostname with capitals in it. Problem solved.
    The RFC is actually quite clear about the fact that you can use upper case characters in hostnames, but that hostnames should be interpreted in a case-insensitive manner. This means that 'Tims-Laptop' would be invalid if you are also trying to use 'tims-laptop', but that 'Tims-Laptop' is perfectly valid if there are no such collisions. A small amount of experimentation shows that my 10.04 system handles hostnames in just this way.

    One of the other things that you did must have solved the problem.

  6. #6
    Join Date
    Oct 2008
    Location
    New York
    Beans
    2,649
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Unable to resolve host

    Interesting......I am going to have to experiment some more then.
    My Launchpad
    ----------------------------------------------------------------------------------------
    My Wiki Page

  7. #7
    Join Date
    Sep 2010
    Beans
    1

    Re: Unable to resolve host

    Quote Originally Posted by Brandon Williams View Post
    If your /etc/hostname file contains the name 'Tims-Laptop', then there should be an entry for Tims-Laptop in your /etc/hosts file, too, as in:
    Code:
    127.0.1.1 Tims-Laptop
    This will allow the hostname to be resolved to a localhost address.
    I have the same problem and tried the recommended input in the terminal, but reply is there is no such file or directory?

    But if I go to File System/etc there is a file named hostname with my user name (admin) in it. But only the name, I actually had to change it lately to a shorter version in order to connect from my Windows laptop.

Bookmarks

Posting Permissions

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