Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

null at terminal

I use bash heavily daily and recently instead of getting my computer name at the bash prompt, I get a (null).Any ideas anyone?

Mac Pro, Mac OS X (10.7.2)

Posted on Oct 20, 2011 1:33 AM

Reply
19 replies

Dec 6, 2011 3:08 PM in response to obiesie

Just want to say this also fixed it for me. It took me a long time to figure out what the problem was and I'm assuming that anyone who is having this problem is probably somewhat techy to begin with... and because it's a hard thing to actually google I'm writing it out a bit better (so google robots can do their magic and hopefully help someone else!)


The problem:

When you open a terminal window it says:

(null):~ eamonngahan$

instead of:

Eamonns-MacBook-Air:~ eamonngahan$



The solution:

Quit Terminal. Turn off wifi and turn it back on. Open a new terminal window. Fixed

Dec 6, 2011 3:36 PM in response to obiesie

On further investigation it seems to be a problem with the way my router is recognising/interpreting my computer's machine name.


When attempting to turn my wifi off and back on again, the machine name has now changed to "macbookpro-7fc8".


I have had a look at my router's configuration and in the list of attached devices this is the exact same name that appears...

Dec 6, 2011 5:10 PM in response to mdavidson

I just tried a bit of everything, removing networks, editing "Computer name" under "share", etc etc.


Seems to be working now so I will just write out what I did (it makes no sense that this would fix it, but it is fixed at the moment)


1. Router sees device name as NULL - I have a SKY ADSL router (UK). Sometimes it see's me as MACBOOKAIR-C371 or something similar.

192.168.0.2(NULL)04:0c:ce:d3:c4:88

2. I manually set a device name for a MAC address (without apostrophe -I don't think it likes the apostrophe in "Eamonn's")

http://cl.ly/2E2D392F0j0w1D3M3u2G

Address Reservation
#IP AddressDevice NameMAC Address
1192.168.0.2EamonnsMacBookAir04:0c:ce:d3:c4:88

At this point it I don't believe it was working then I set to connect to the router manually (DHCP with manual address)

3. http://cl.ly/2g3F1F243q1U182d282p


It seems to be working now, haven't restarted yet :scared:

null at terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.