Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I open my terminal it shows this:

wpa-2-602:~ david$

I just curious what the wpa-2-602 means? "david" is my user name, and sometimes it was something else. What makes it change?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

That's based on the PS1 variable set in Bash's initialization. Yours appears to be the default, which is your computer's name, followed by a colon, then the current directory (in your example, that'd be the home directory for your computer [~]), then your username (david).

Here is an article about customizing your PS1, and there are plenty of questions both here and over at Super User about changing and fixing it.

share|improve this answer
4  
The computer's name will be used unless the dhcp client get's another host name when connecting to a network. My guess is that the OP is noticing the name change when he's on a network whose dhcp server actually responds to the host name request from his computer. –  ephsmith Jul 12 '12 at 1:14
    
Any particular complaint from the downvoter? –  CajunLuke Jul 12 '12 at 18:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.