2

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!

Gareth
  • 19,080
Nik So
  • 599

2 Answers2

2

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...".

Arjan
  • 31,511
lhagemann
  • 296
2

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 "#"