Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JamDonut

macrumors member
Original poster
May 23, 2011
96
0
England, UK
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! :)
 

Attachments

  • Screen shot 2011-05-30 at 22.34.10.png
    Screen shot 2011-05-30 at 22.34.10.png
    132.7 KB · Views: 1,094
Last edited:
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?
 
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.
 
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.
 
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.

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
 
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
 
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
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
 
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
 
Last edited:
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..
 
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

This worked! thank you so much JP you are a God :D finally a solution to this pain in my A*** :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.