Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: How to change Computer name

  1. #11
    Join Date
    Jul 2009
    Location
    in front of the computer
    Beans
    139
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to change Computer name

    Eing?!
    Its /etc/hosts and /etc/hostname not /home/mycomputername/etc/hosts
    linux user: #498107

  2. #12
    Join Date
    Feb 2010
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to change Computer name

    Hi there, thanks for your quick reply - but as I said, I typed ***exactly*** what taurus wrote, but I still got that error.

    See screenshot attached.
    Attached Images Attached Images

  3. #13
    Join Date
    Jul 2009
    Location
    in front of the computer
    Beans
    139
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to change Computer name

    Quote Originally Posted by linux.girl View Post
    Hello everyone,

    I'm quite new with Linux in general, am experimenting with Ubuntu for the first time. I tried to change the Computer name just like taurus indicated, but I get an error that says:

    could not find the file /home/mycomputername/etc/hosts

    I tried to edit the hosts file via gui and command line, got the same error on both. And I did type it correctly.

    Any idea what could be wrong?

    Appreciate your help in advance, this is a great community, proud to be around.
    /home/mycomputername/etc/hosts NO
    /etc/hosts YES ; gksudo gedit /etc/hosts
    http://www.debianadmin.com/images/ldr.png
    Last edited by argos3016; February 19th, 2010 at 07:04 PM.
    linux user: #498107

  4. #14
    Join Date
    Feb 2010
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to change Computer name

    Again, as I mentioned before, I typed EXACTLY what taurus wrote, meaning, etc/hosts and ********NOT********* home/mycomputer/etc/hosts, but I get that error as if I did type the wrong thing. I get the same error when I go to etc/hosts via the GUI.


    Again, thanks for your help.

  5. #15
    Join Date
    Jul 2008
    Location
    Siegen, Germany
    Beans
    181
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: How to change Computer name

    I have just read your reply; according to the screenshot you are still in the wrong directory.

    Code:
    sudo gedit /etc/hosts
    Code:
    sudo gedit /etc/hostname
    Last edited by manoriax; February 19th, 2010 at 07:15 PM.
    "It matters not what someone is born, but what they grow to be." -Albus Dumbledore
    Flickr - tumblr - Last.fm - PGP-Key - Blog

  6. #16
    Join Date
    Jul 2009
    Location
    in front of the computer
    Beans
    139
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to change Computer name

    OR in a terminal:
    sudo nano /etc/hosts
    linux user: #498107

  7. #17
    Join Date
    Feb 2010
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to change Computer name

    I saw the screenshot and I insist I did type exactly as you mention but for some reason instead of going to etc/hosts it goes look for the hosts file at /home/myccomputername/etc/hosts and says it is not found

    Not only that, when I go to the gui, I find the hosts file at /etc, but when I try to edit it, it gives me the EXACT same error...

    I know it sounds I am dumb and don't know where I am in the filesystem, but I believe that via GUI it is pretty clear even a "dumb" person would know...and I still get this error...anyways, I think I might not be explaining myself as well as should - let's forget about it and thanks anyways guys, this is a lot of fun

    PS: just now saw your answer argos, will try that, thnx!

  8. #18
    Join Date
    Feb 2010
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to change Computer name

    the "nano" worked, thanks!!!

    I hope you guys know how grateful I am for your help, was just a little frustrated before, sorry if I sounded harsh.

    many many thanks!!!!!!


  9. #19
    Join Date
    Jan 2010
    Beans
    4
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to change Computer name

    Just FYI, you said you were typing
    Code:
    etc/hosts
    whereas the command given was
    Code:
    /etc/hosts
    It's an easy mistake to make and if you're new to Linux it may not seem important, but it is a significant difference. The former is a relative reference, and the latter is an absolute reference. So with the first, the command line interpreter would start from whatever directory you are currently in (which, if you were in your home directory would explain why it showed up as /home/myccomputername/etc/hosts). The second (/etc/hosts) is an absolute reference starting at the root directory /.

    Hopefully this makes sense to you and will help you dealing with the command line in the future.

  10. #20
    Join Date
    Feb 2010
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to change Computer name

    hi there, thanks for the tip!

    the etc/hosts was a typo here in the post, was just in a hurry - when i put the command in the command prompt, it was in the correct form, /etc/hosts - I know it because I simply copy pasted what tauros had suggested.

    in any event, I did learn a lesson from you - i did copy paste without really understanding all the differences and thanks to your explanation, i do now.

    many many thanks, i really appreciate!!!

Page 2 of 3 FirstFirst 123 LastLast

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
  •