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

ltHank

macrumors newbie
Original poster
Nov 4, 2008
19
0
Ever since I let my buddy charge his iPod on my computer, my Terminal displays the following for input:

iPod~: [username]$
(Where username is, of course, my username.)

It didn't used to do this, and I have no idea how to interpret this. It doesn't seem to affect performance in any way, but I don't like having that there. I charge (and sync) my own iPod Shuffle all the time and have had no problems like this.

Can anyone help me get back the default? I recall it is supposed to show the path, isn't it?
 
Under your Preferences Pane, in "Sharing," what's your computer name? If it's "iPod," there's your problem.
 
The title for my computer under sharing is the same as it usually is (not 'iPod'!).
 
Check your hostname configuration in the network preferences.

You can also check in Terminal, by issuing:
Code:
hostname
 
That seems to be it:

1. Checking the 'Network' preference pane (and going into 'Advanced...'), I found that the NetBIOS Name (under WINS) is 'IPOD,' in all capitals. Though this doesn't directly correspond to what is shown in Terminal ('iPod'), it does seem to lead me somewhere...

2. Using the command 'hostname' yielded the following:

iPod.[DNS Search Domain]
(Where [DNS Search Domain] is the entry under 'Search Domain' in the 'DNS' part of the Network's Advanced menu)

Should I just change the NetBIOS Name?
 
Yep. FYI, NetBIOS names are always capitals, but Unix can see them as case-sensitive. Just change it back to what you want. I believe you'll need to restart Terminal for it to recognize the change.
 
Ach, it won't seem to keep any changes to the NetBIOS name. Interestingly, when I turn off my Airport, it switches back to my computer's name as listed in the Sharing pref. pane. Any idea on how to do to this exactly?

I did manage to swap back to my computer name by forcing change using 'sudo hostname [name]', but it just reverts back to 'iPod' if I turn off my wireless and restart my wireless.
 
Check /etc/hosts on your system
Code:
cat /etc/hosts

This sounds like it is caching it somewhere in DNS or /etc/hosts.
 
Check /etc/hosts on your system...This sounds like it is caching it somewhere in DNS or /etc/hosts.

Upon execution of 'cat /etc/hosts', I see the following.

Code:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost 
fe80::1%lo0	localhost

I don't know exactly what to make of this, but I don't see 'iPod' in there...
 
Now I am on a different wireless and my computer name has been returned to its rightful place in the terminal. When I get home again I'll check if the name is fully restored or if it is just somehow dependent on the network I am attached to. I'll post more then.
 
What is your network name at home?

I've noticed that when I'm connected to my University wireless, in Terminal it displays exactly the same as you, only instead of iPod it is part of the network name.
 
What is your network name at home?

I've noticed that when I'm connected to my University wireless, in Terminal it displays exactly the same as you, only instead of iPod it is part of the network name.

Here's one thing you can try. I am assuming you're using the OS X default shell of bash. One of your bashrc files in ~/ (.profile, .bash_profile, .bashrc) may or may not exist, in which case it is using the default prompt. If one of these files is set, you may see something in one of the files that looks like:

PS1=\h\W: [\u]$

That '\h' is displaying the host of the current network you are on. It resets only at each session of bash or invocation of 'source' (see below).

If not, you can set this PS1 shell variable and play around with various prompt settings (and customize it). To do so, simply edit one of those above files (such as .bashrc) and then save it, and then run 'source ~/.bashrc' from the CLI in order to instantly see the reflected changes. You can find a list of customizable options at:

http://www.linuxselfhelp.com/howtos/Bash-Prompt/Bash-Prompt-HOWTO-2.html

under section 2.5.

If you manage to screw something up, simply edit the file in another shell or in a GUI editor (such as TextMate, using show hidden files).
 
TO: Kilamite
Yeah, it seems to be related to my campus network. It set it self correctly when I left, but doesn't seemed to have restarted now that I am back. Interesting.

TO: darwinian
Thank you for the in-depth response... though at the moment it seems more or less over my head. I'll take a look at it, though, for future reference.
 
Darwinian - thanks for that. I'll check out the link - I'm trying to learn the many Unix commands of Terminal.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.