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)
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
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)
Sounds like your definition for $PS1 got screwed up. Did you clobber it or set it wrong in one of the bash startup scripts? Do an echo of $PS1 to see it's current definition.
That seems to be fine, it shows \h:\W:\u\$ when I echo the variable.
Done some fiddling around and it seems that my computer host name is null..any idea how i can fix this?
Hmm, weird. All I can suggest is to check the terminal preferences to see if anything is "fishy".
Done some fiddling around and it seems that my computer host name is null..any idea how i can fix this?
In the System Preferences --> Sharing, is the Computer Name set?
I have tried setting that but the hostname always resets to (null)
Just to be clear. You are saying the computer name is empty in the Sharing preferences?
Make sure when/if you set it you quit the system prefs and also relaunch terminal.
still no change.Even the personal website address in websharing shows a (null)
Sorry, I'm out of ideas (other than trying to logout and back in maybe???).
just resolved it...switched of my wifi and switched it on again and it was sorted..thank you all
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
I am having the exact same problem, however turning my wifi off and on again does not same to make any difference - it literally changes back to null as soon as I am connected again.
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...
actually now I'm getting the same problem. If I turn off Wifi it's fixed then it goes back to null. Never had this before!
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 | ||||||||||
|
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