You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal-IP address instead of computer name is showing

Hi, my computer is behaving strangely lately and I noticed that in terminal the host name is displayed like this:
c-XX-XXX-XX-XX-XXX:~ myusername%
with XX numbers corresponding to my actual IP address

When I looked in my 1 month old backup, it is displayed correctly there with an actual drive name.
In addition, the current shell is tsch, despite the fact that I am running OSX10.4.11 where it is supposed to be bash as far as I understand.
Is displaying IP address in terminal instead of computer name normal? If not, how to reset this?

Any help would be much appreciated.

Quick Silver G4, 933mhz, Mac OS X (10.4.11), 1gb RAM

Posted on Dec 16, 2008 8:56 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 16, 2008 10:34 AM

Hi IMilos, and a warm welcome to the forums! 🙂

Try System Preferences>Sharing, and edit the Computer name there.

It also might mean you need to trash this file & reboot...

/Library/Preferences/SystemConfiguration/preferences.plist
6 replies

Dec 16, 2008 12:17 PM in response to BDAqua

BDAqua,
My report:
1. Moved preferences.plist from /Library/Preferences/SystemConfiguration/preferences.plist into trash.
2. rebooted.
3. Computer now shows [localhost] in terminal as a host name-success. However, now Internet does not work.
4. Went to System preferences>Network>Built-in-Ethernet. There was a blank page (all settings gone).
5. No matter. Inputed comcast.net in Search domains field (Comcast is my provider). Clicked on Apply now. All settings came back, internet works.
6. Now Terminal again shows my IP as a host name, but at least I know that this change came from Comcast.

Unexpected benefit: Apparently this procedure got rid of annoying "Your settings are being modified by another application" bug-Good to know, thanks.

Conclusion: For some reason Comcast sees fit to modify Terminal settings.

Big thanks for making the problem clearer.

Dec 16, 2008 1:29 PM in response to IMilos

IMilos wrote:
Conclusion: For some reason Comcast sees fit to modify Terminal settings.

IMilos

This is a common enough general problem, not exclusive to Comcast.

There's a fuller explanation in this topic: Custom Prompt sometimes shows wrong Machine Name, and the simple way to fix it is in Ignoring a DHCP-supplied hostname. Also Andreas' post in this topic may help further.

Dec 16, 2008 6:35 PM in response to Michael Conniff

Michael,

Thank you. I sort of wondered through all that lingo and got some limited understanding of the issue.

I simply dislike the fact that someone changed something on MY computer without asking first. I was suspecting hacking because the whole thing with Terminal, cable and computer behaving strangely occured during my attempt on Lynx installation, but if it is cable company changes, then situation is most of a annoyance then of computer hacking. Some piece of mind was gathered.

Thanks a lot.

Dec 17, 2008 9:34 AM in response to IMilos

Comcast isn't changing anything on your computer. You presumably have your shell prompt set to a value that includes the hostname. (The default bash prompt on OS X is "\h:\w \u\$". The \h means "the hostname up to the first '.'".) It is your computer that is configured to get the hostname from the network, not your ISP modifying settings on your machine.

You can change the prompt to whatever you want. See the bash man page about PS1 and the section on "Prompting".

Terminal-IP address instead of computer name is showing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.