Results 1 to 4 of 4

Thread: localhost localdomain

  1. #1
    Join Date
    Jun 2007
    Location
    Deland, FL
    Beans
    748
    Distro
    Ubuntu 22.10 Kinetic Kudu

    localhost localdomain

    i forgot my password and had to go into root by using recovery mode on boot and reset my password. Now instead of my pc being called a600n it calls itself localhost.localdomain. How do i fix this?

    OS= 12.04 32-bit

    john

  2. #2
    Join Date
    Dec 2011
    Beans
    86

    Re: localhost localdomain

    What is the output of:

    Code:
    cat /etc/hostname

  3. #3
    Join Date
    Jun 2007
    Location
    Deland, FL
    Beans
    748
    Distro
    Ubuntu 22.10 Kinetic Kudu

    Re: localhost localdomain

    john@localhost:~$ cat /etc/hostname
    localhost.localdomain

  4. #4
    Join Date
    Feb 2012
    Location
    Athens/Greece
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: localhost localdomain

    Hello ,
    you can change the names is two files .

    1st , the file that @ducan12 mentioned

    2nd , the file /etc/hosts.

    Be careful to write the SAME name exactly.

    e.g :

    I want to change the name of computer to MyComputer.

    I do

    Code:
    gksudo gedit /etc/hostname
    and write
    Code:
    MyComputer
    Then I do
    Code:
    gksudo gedit /etc/hosts
    and change the 2nd line next to 127.0.1.1 (the first line is localhost) with MyComputer .
    So the contents of the file /etc/hosts will be
    Code:
    127.0.0.1    localhost
    127.0.1.1    MyComputer
    
    # 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
    Reboot for the changes take effect.

    Thanks

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
  •