Results 1 to 7 of 7

Thread: minor problem in terminal

  1. #1
    Join Date
    Dec 2006
    Beans
    11
    Distro
    Ubuntu 6.06 Dapper

    minor problem in terminal

    recently, using sudo command in terminal I've been getting this result

    knoc@knoc-laptop:~$ sudo aptitude update
    sudo: unable to resolve host knoc-laptop
    [sudo] password for knoc:
    Get:1 http://download.tuxfamily.org feisty Release.gpg [189B]
    Get:2 http://security.ubuntu.com hardy-security Release.gpg [189B]

    ...and so on and so forth

    I just suddenly started getting the "sudo: unable to resolve host knoc-laptop"

    why is this? and what can I do to get rid of it? I'm sure it was some stupid mistake I made. Any help is appreciated. Thanks in advance

  2. #2
    Join Date
    Jul 2007
    Location
    Swap
    Beans
    1,061
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: minor problem in terminal

    Can you post the output of:
    Code:
    cat /etc/hosts
    Be Safe. Use Linux.
    Double your drive space. Delete Windows.

  3. #3
    Join Date
    Dec 2006
    Beans
    11
    Distro
    Ubuntu 6.06 Dapper

    Re: minor problem in terminal

    knoc@knoc-laptop:~$ cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 knoc-laptop.MAIN

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

  4. #4
    Join Date
    Dec 2006
    Beans
    11
    Distro
    Ubuntu 6.06 Dapper

    Re: minor problem in terminal

    I went into my network settings host list and deleted

    127.0.1.1 knoc-laptop.MAIN

    and the problem was solved. Thanks for pointing me in the right direction. I think I was trying to join a windows workgroup earlier where I made the mistake. I'm installing samba at the moment to get that straightened out.

  5. #5
    Join Date
    Mar 2008
    Location
    City of Pines
    Beans
    3,585

    Re: minor problem in terminal

    Quote Originally Posted by knoc View Post
    knoc@knoc-laptop:~$ cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 knoc-laptop.MAIN

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    On your terminal:

    Code:
    gksudo gedit /etc/hosts
    and remove the .MAIN from this line:

    Code:
    127.0.1.1 knoc-laptop.MAIN
    so that it would just be:

    Code:
    127.0.1.1 knoc-laptop
    Save and Close file. Then:

    Code:
    sudo apt-get update && sudo apt-get upgrade
    EDIT: Disregard, Problem had been resolved by the OP
    Steady movement is more important than speed, much of the time. So long as there is a regular progression of Stimuli to get your mental hooks into, there is room for lateral movement. Once this begins, its rate is a matter of discretion.

  6. #6
    Join Date
    Jul 2007
    Location
    Swap
    Beans
    1,061
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: minor problem in terminal

    Quote Originally Posted by knoc View Post
    knoc@knoc-laptop:~$ cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 knoc-laptop.MAIN

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    Try
    Code:
    gksudo gedit /etc/hosts
    then change it to look like this
    Code:
    127.0.0.1 localhost
    127.0.1.1 knoc-laptop
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    Be Safe. Use Linux.
    Double your drive space. Delete Windows.

  7. #7
    Join Date
    Apr 2006
    Location
    New Mills, UK
    Beans
    1,213

    Re: minor problem in terminal

    Quote Originally Posted by knoc View Post
    knoc@knoc-laptop:~$ cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 knoc-laptop knoc-laptop.MAIN

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    change it to this and it will work for the work group or normal access.
    This is a known bug in network admin app
    Malac - "Time Is Precious, Waste It Wisely"
    Registered Linux User 416897
    Registered Ubuntu User 7567

Tags for this Thread

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
  •