Mac Name Won't Change In Terminal- Tried Everything!

Discussion in 'MacBook Pro' started by JamDonut, May 30, 2011.

  1. JamDonut, May 30, 2011
    Last edited: May 30, 2011

    JamDonut macrumors member

    Joined:
    May 23, 2011
    Location:
    England, UK
    #1
    Hi All,

    So as the title suggests, i cannot change my computers name in terminal, it says it is called 'cexsmacbook', which is the company i bought it from. I have tried the 'sharing' preference pane and 3 clean installs of SL, each time formatting the drive, and when i log in it is 'my name' macbook, and in system prefs. its my user name too, but in terminal it still won't change... Any ideas?? :S



    (btw this is on a 09 aluminium macbook but the macbook section does not seem to deal with hugely technical issues i hope this isnt too far against the forum rules but really need the advice!!)

    this is my last resort before going off to the apple store, it's really annoying me lol, no i dont have OCD! :)
     

    Attached Files:

  2. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
  3. JamDonut thread starter macrumors member

    Joined:
    May 23, 2011
    Location:
    England, UK
    #3
    grateful for the speedy response, as you miraculously always seem to! but im afraid even when logging in as root and trying all of the suggestions in these links, the problem still persists, odd i know!

    does anyone know if there is a terminal command or something which can fix the issue?
     
  4. aces2 macrumors newbie

    Joined:
    Dec 28, 2010
    #4
    I Time Machined my Macbook HDD to my Macbook Pro HDD, I was perturbed that it didn't change the name of my "Device" as seen @ the left in Finder. To change it I went to Sharing in System Preferences and Just added "Pro" to the end of the name.

    Reboot.

    Now it shows up in Terminal as well!

    EDIT: Sorry, didn't see that you had tried this... hmm, well, it worked for me but I can't think of anything further to help sorry to waste your time.
     
  5. jenzjen macrumors 68000

    Joined:
    Aug 20, 2010
    #5
    You've done 3 clean installs and still the same? Are you setting it up as a new machine or restoring from a backup? You should set it up as a new machine and just copy back files you need vs restoring from a backup.
     
  6. JamDonut thread starter macrumors member

    Joined:
    May 23, 2011
    Location:
    England, UK
    #6
    yep the last two i literally did it as a new machine, formatted my drive, and then manually restored my files from an external HDD, still the same. it makes no sense lol
     
  7. jpeezy macrumors regular

    Joined:
    Feb 24, 2010
    #7
    My guess is it's an environment variable that is set. Try this at the prompt: "echo $PS1", no quotes and see what its set to. If its the same as the prompt, check the file ".profile" in your home directory. Its probably set in there, which you can remove.

    JP
     
  8. JamDonut thread starter macrumors member

    Joined:
    May 23, 2011
    Location:
    England, UK
    #8
    hi, i typed in '"echo $PS1" and i got

    \h:\W \u\$

    so thats home folder, but then i dont know what \w is :S

    my .profile looks like this:
    # System-wide .profile for sh(1)

    if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`
    fi

    if [ "${BASH-no}" != "no" ]; then
    [ -r /etc/bashrc ] && . /etc/bashrc
    fi

    any ideas what i need to do to change it?

    thanks for your help
     
  9. jpeezy, May 30, 2011
    Last edited: May 30, 2011

    jpeezy macrumors regular

    Joined:
    Feb 24, 2010
    #9
    I apparently guessed wrong. :) \w is for your current path. Try this:

    sudo hostname your_hostname

    If that doesn't work, try this:

    sudo scutil --set HostName your_hostname

    You will need to close/re-open terminal to see the changes.

    JP
     
  10. dslrjunky macrumors regular

    Joined:
    Apr 18, 2011
    #10
    I would like to know these as well... though mine is not as pervertive as yours :D:D:D i want to change it too..
     
  11. JamDonut thread starter macrumors member

    Joined:
    May 23, 2011
    Location:
    England, UK
    #11
    This worked! thank you so much JP you are a God :D finally a solution to this pain in my A*** :)
     

Share This Page