After installing new versions of Ruby on Rails through RailsInstaller my command line prompt changed to unknownf81edfdc0983. Why is this happening, and how do I switch it back to normal? It used to display my computer's name (i.e. gabriels-MacBook-Pro). I have rebooted and restarted my terminal, and I don't think I'm running any Ruby in my profile. My computer name on System Preferences is Gabriel’s MacBook Pro. Can somebody help?
1 Answer
It's probably nothing to do with Rails, it's probably your DHCP server giving you a hostname.
You can reset it using
$ sudo hostname gabriels-MacBookPro
EDIT: See http://excitedcuriosity.wordpress.com/2007/08/24/mac-os-x-hostname-determination/
-
The x-ref'd blog entry is a little dated, unfortunately. On my (slightly dated) 10.7.5, the
/etc/hostconfig
file contains (slash for newline):# This file is going away / AFPSERVER=-NO- / AUTHSERVER=-NO- / TIMESYNC=-NO- / QTSSERVER=-NO-
. Note that there is no HOSTNAME entry as mentioned in the blog. However, the name determination sequence (DHCP or BootP, Reverse DNS, System Preferences,localhost
) is likely to be close to the algorithm used. Commented Dec 26, 2012 at 18:50 -
Thanks. I got it back to what it was, and thanks for giving me more insights as to what is the main cause of the change!– fenomalistCommented Dec 26, 2012 at 18:59
unknown<MAC address>
(where that MAC is unrelated to it being a Mac). So, look to your network infrastructure for an explanation.