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?


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.

  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .