Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I really cannot remember since when this began to occur or what I did immediately before this occurred for the first time, but the terminal prompt now includes a little network card MAC address-like dash-separated alphanumeric string before my username:

enter image description here

In the photo it's the "b8-8d-12-0a-d8-96"

It doesn't change if I restart or do anything else. I got this Mac only two months ago and know very little about the environment. I don't remember seeing this string a couple of weeks ago. What is this string and can I hide it or get rid of it?

ADDED reply to user Ravachol's comment here: Typing echo $PS1 in the terminal yields:

\h:\W \u\$

Typing hostname in the terminal yields:

b8-8d-12-0a-d8-96.connectify

I am actually currently traveling, using a little Windows 7 netbook with an app called Connectify to rebroadcast the WiFi signal. Connectify's strength lies in that it can use the SAME WiFi adapter to both receive a WiFi signal that's Internet-bound and turn itself into a router and rebroadcast that Internet-bound WiFi signal.

On the Connectify interface on Windows, I see that my iPod Touch is a client, labeled "Nik's iPod Touch", and "b8-8d-12-0a-d8-96" is also a client. "b8-8d-12-0a-d8-96" is the same as what precedes my username in the terminal, the core of this post. Hope this helps!

share|improve this question
2  
Can you tell us what is the result of "echo $PS1" ? Also, do you have a mention of PS1 in your ~/.bashrc or ~/.bash_profile ? (~/ being your home directory) –  Ravachol Dec 27 '11 at 12:59
    
Ho and these hex numbers seem to be your hostname. Can you please type "hostname" and tell us what is outputs ? I'd guess your hostname is b8-8d-12-0a-d8-96 OR that the encoding of the hostname is not supported. –  Ravachol Dec 27 '11 at 13:07
    
Is Connectify running on your Mac, or some other network client software (e.g. VPN)? –  Daniel Beck Dec 28 '11 at 7:32
    
Hi Daniel, no Connectify is Windows only. I am running Connectify on Windows 7 on a netbook. It creates an Access Point which my Mac is connected to in order to use the internet. –  Nik Dec 28 '11 at 8:03
    
What do you want your prompt to look like? –  Stephen Jennings Dec 28 '11 at 15:49

2 Answers 2

up vote 2 down vote accepted

It looks like your Mac's hostname has changed to be equal to its MAC address. Check System Preferences → Sharing and see what the computer name is. Changing the computer name here changes what "hostname" returns in the terminal.

Alternatively, if you want the prompt to just show the current directory, edit the file ~/.bash_profile and add the line export PS1="[\W]\$ ". If you already have a PS1 line, then replace it with this one. There are also other special sequences you can add to your .bash_profile if you so desire.

Your prompt right now is:

b8-8d-12-0a-d8-96:~ nikso$

Which looks like:

(hostname):(current directory) (username)$

Which matches your $PS1:

\h:\W \u\$

\h: Hostname up to the first "."
\W: Current directory
\u: Username
\$: A literal "$", unless you are UID 0, then "#"
share|improve this answer
    
Hi Stephen, my computer's name is Nik's Macbook Air. and I just ran a little test where I closed out all terminal windows, turned off Wifi. reopened terminal. And now it displays Niks-MacBook-Air:~nikso$ is there! And when I turned back on the Wifi, I didn't even need to open up a new terminal, just a new tab and it shows that MAC Address. But my .bash_profile doesn't have that line. It has something about rvm,the ruby version manager. Should I just add to it anyways? –  Nik Dec 28 '11 at 17:59
    
@Nik: Yes, if you add that line to ~/.bash_profile then your prompt will just show the current directory. The default PS1 comes from /etc/bashrc –  Stephen Jennings Dec 29 '11 at 2:05

This appears to be standard behavior for Connectify:

http://support.connectify.me/entries/20472872-how-can-i-rename-a-client

Connectify usually displays the hostname for client machines that connect to your network. Sometimes however, Connectify is unable to get the machines' name from it automatically (since Apple went to iOS 4 on the iPhone, this has become unfortunately frequent). When Connectify cannot find any name for a computer it will use the MAC address which is generally something hard to remember like "ab-3f-2c-5d...".

share|improve this answer
    
oh no no, I know what you are saying, you are saying that the Connectify's displaying of that b8-8d-12-0a-d8-96 string is because it can't find my Macbook air's name, I can understand that. What I was asking was that how come my Macbook Air's terminal prompt NOW displays b8-8d-12-0a-d8-96 in front of username$. Thanks anyways –  Nik Dec 28 '11 at 17:49
    
based on your comment to @Stephen Jennings below, I believe that the Connectify DHCP is setting the hostname for you. –  lhagemann Dec 28 '11 at 20:04
1  
see here for how to change it: superuser.com/questions/357159/… or here: superuser.com/questions/49891/… –  lhagemann Dec 28 '11 at 20:22

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.