Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Mac OS X > Mac OS X 10.7 Lion

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 9, 2011, 03:10 AM   #1
Akarin
macrumors regular
 
Join Date: Oct 2011
Location: Nyon, Switzerland
Question terminal not showing machine's name. Why?

Hi all,

When I open terminal, I see this:



Before I used to have "myname's Mac mini:" on the prompt. Now, I always have this "unknown..." line. Anybody knows why and how to fix it?

Thank you!
__________________
The easiest way to spread your ideas and connect with the relevant people: Qwikast
Akarin is offline   0 Reply With Quote
Old Nov 9, 2011, 03:26 AM   #2
sidewinder
macrumors 68020
 
sidewinder's Avatar
 
Join Date: Dec 2008
Location: Northern California
Have you looked at what the "Computer Name" is set to in "Sharing" preferences?

S-
__________________
Mac Pro: 8-core 2.8 GHz, 10GB RAM, OS X 10.8.2; iPhone 5 32GB iOS 6.1
sidewinder is offline   0 Reply With Quote
Old Nov 9, 2011, 04:05 AM   #3
Akarin
Thread Starter
macrumors regular
 
Join Date: Oct 2011
Location: Nyon, Switzerland
Quote:
Originally Posted by sidewinder View Post
Have you looked at what the "Computer Name" is set to in "Sharing" preferences?

S-
Yes... It's set on "MyName's Mac mini".
__________________
The easiest way to spread your ideas and connect with the relevant people: Qwikast
Akarin is offline   0 Reply With Quote
Old Nov 9, 2011, 06:03 AM   #4
Quad5Ny
macrumors 6502a
 
Join Date: Sep 2009
Does the "hostname" and "whoami" command list the correct info?

Try quitting Terminal completely and then logging on/off of your account.
Quad5Ny is offline   0 Reply With Quote
Old Nov 9, 2011, 11:03 AM   #5
Akarin
Thread Starter
macrumors regular
 
Join Date: Oct 2011
Location: Nyon, Switzerland
Quote:
Originally Posted by Quad5Ny View Post
Does the "hostname" and "whoami" command list the correct info?

Try quitting Terminal completely and then logging on/off of your account.
This is what I get with those two commands, after logging off and back on:

__________________
The easiest way to spread your ideas and connect with the relevant people: Qwikast
Akarin is offline   0 Reply With Quote
Old Nov 9, 2011, 01:44 PM   #6
Macopotamus
macrumors regular
 
Join Date: Jun 2010
Quote:
Originally Posted by Akarin View Post
This is what I get with those two commands, after logging off and back on:

Image
Try setting the hostname again with "sudo hostname -s MacName"
__________________
Sites I read: http://macrumors.com - http://9to5mac.com - http://osxdaily.com
Macopotamus is offline   0 Reply With Quote
Old Nov 9, 2011, 06:20 PM   #7
yawns
macrumors member
 
Join Date: Oct 2011
sudo scutil --set HostName NAMEYOUWANT.local

sudo hostname doesn't save between reboots.
__________________
I like that the email automatically says, "Sent from a MacBook Wheel." That way people know you have one.
yawns is offline   0 Reply With Quote
Old Nov 11, 2011, 01:39 AM   #8
Akarin
Thread Starter
macrumors regular
 
Join Date: Oct 2011
Location: Nyon, Switzerland
I tried both commands above and none of them work. My terminal just enters a mode with a prompt showing this:

>

...and nothing else. Then no command works and I have to quit & re-launch terminal before arriving to the same view as in the original post above.
__________________
The easiest way to spread your ideas and connect with the relevant people: Qwikast
Akarin is offline   0 Reply With Quote
Old Nov 11, 2011, 01:56 AM   #9
Phil A.
macrumors 68040
 
Phil A.'s Avatar
 
Join Date: Apr 2006
Location: Telford, UK
Wirelessly posted (iPhone 4: Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1)

Try setting your DHCP client ID to your machine name in network settings and then Renee your DHCP lease.
I've seen this before when a DHCP server updates the DNS server with unknown and the MAC address which then gets used as the hostname.
__________________
Tell a man there are 300 billion stars in the universe and he'll believe you. Tell him a bench has wet paint on it and he'll have to touch it to be sure. ~Murphy's Law

Last edited by Phil A.; Nov 11, 2011 at 01:56 AM.
Phil A. is offline   0 Reply With Quote
Old Nov 11, 2011, 05:57 AM   #10
Akarin
Thread Starter
macrumors regular
 
Join Date: Oct 2011
Location: Nyon, Switzerland
Quote:
Originally Posted by Phil A. View Post
Wirelessly posted (iPhone 4: Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1)

Try setting your DHCP client ID to your machine name in network settings and then Renee your DHCP lease.
I've seen this before when a DHCP server updates the DNS server with unknown and the MAC address which then gets used as the hostname.
Although the client ID was blank and I did what you propose, still no joy. Still having the unknown string in terminal...
__________________
The easiest way to spread your ideas and connect with the relevant people: Qwikast
Akarin is offline   0 Reply With Quote
Old Nov 28, 2011, 12:19 AM   #11
Grimace
macrumors 68040
 
Grimace's Avatar
 
Join Date: Feb 2003
Location: with Hamburglar.
I think Lion changed the name from something you name it to your MAC address. Check your Network settings and it probably matches up.
__________________
Canon 1Ds Mk III • Canon 5D MkII
16-35mm f/2.8L II • 24-70mm f/2.8L • 70-200mm f/2.8L IS II
50mm f/1.2L • 85mm f/1.2L • 135mm f/2L • 300mm f/2.8L IS
Grimace is offline   0 Reply With Quote
Old May 2, 2012, 09:14 PM   #12
shamalk
macrumors newbie
 
Join Date: Mar 2012
Smile Are you using Ethernet ?

Hi,
I have this problem when I connect my mac book air to Ethernet using the Ethernet to USB adapter.

When I remove Ethernet I get my normal hostname back.

Hope this helps.
shamalk is offline   0 Reply With Quote
Old May 3, 2012, 01:23 AM   #13
sidewinder
macrumors 68020
 
sidewinder's Avatar
 
Join Date: Dec 2008
Location: Northern California
The problem isn't your computer. Phil A. is right. The problem is that is the name you DHCP server is handing you.

Edit your account's ".bash_profile" file and add this to it:

Code:
PS1='$(networksetup -getcomputername):\W \u\$ '
The ".bash_profile" file should be at the root level of your user account. If it is not there, create it.

Now, if you put "8.8.8.8" at the top of your DNS list, I bet your hostname would work fine too.

S-
__________________
Mac Pro: 8-core 2.8 GHz, 10GB RAM, OS X 10.8.2; iPhone 5 32GB iOS 6.1
sidewinder is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Mac OS X > Mac OS X 10.7 Lion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
iTunes not showing album name on burned disc kroupa iMac 1 Mar 18, 2013 05:22 PM
Movies Tab Not Showing Up on Apple Tv 2G polo3400 Apple TV and Home Theater 2 Jul 13, 2011 07:12 AM
Terminal doesn't show computer name - just unknown0025004ad79e:~ PDE Mac OS X 6 Jul 30, 2010 01:52 AM
SMS Messages do not show contacts' names — just phone numbers ziggyonice iPhone Tips, Help and Troubleshooting 2 Jun 22, 2010 08:28 PM
Mail.app not showing folder names... colenbjw Mac Applications and Mac App Store 1 Jun 8, 2007 01:49 PM


All times are GMT -5. The time now is 02:51 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC