Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > I.P. address instead of "localhost"?

I.P. address instead of "localhost"?
Thread Tools
Hobbes
Mac Enthusiast
Join Date: Nov 2000
Status: Offline
Reply With Quote
May 2, 2002, 03:38 PM
 
I was trying to decrypt a file via GPG. For some reason, the file completely screwed up my open Terminal window. A bunch of gibberish went across the screen, and the normal command line prompt didn't show up.

None of the usual commands would release the CLI, and so I finally had to just quit it, despite it saying there were still busy processes. Since then, instead of "localhost" then my username at the prompt, it displays my I.P. address.

I've run fsck -y, I've run the daily/weekly/monthly maintanence scripts, everything I can think of, and nothing changes it back to the way it was.

So three questions...

1. Why did it change in the first place...

2. How, if at all, do I change it back...

3. And is it really important?

Thanks in advance for the help.
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
May 2, 2002, 04:04 PM
 
Originally posted by Hobbes:
<STRONG>I was trying to decrypt a file via GPG. For some reason, the file completely screwed up my open Terminal window. A bunch of gibberish went across the screen, and the normal command line prompt didn't show up.

None of the usual commands would release the CLI, and so I finally had to just quit it, despite it saying there were still busy processes. Since then, instead of "localhost" then my username at the prompt, it displays my I.P. address.

I've run fsck -y, I've run the daily/weekly/monthly maintanence scripts, everything I can think of, and nothing changes it back to the way it was.

So three questions...

1. Why did it change in the first place...

2. How, if at all, do I change it back...

3. And is it really important?

Thanks in advance for the help.</STRONG>
My prompt has changed from localhost to the first part of my (dynamically assigned) DNS address. It doesn't really matter. If you want to search backwards to the source, the prompt is the result of the command "hostname -s". You can change it by hitting "sudo hostname newname". I'm not sure when it is changed automatically - in my case I think it's done when the DHCP lease is renewed. The real answer is most likely hidden deep inside Netinfo.
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
     
The Placid Casual
Professional Poster
Join Date: May 2001
Location: Switzerland
Status: Offline
Reply With Quote
May 2, 2002, 04:07 PM
 
I have the same problem, but local host is not replaced with an ip, but [thisaddressdoesnotexist:~]!! In the thread of that name (started afew days ago, I have found there are 2 possible solutions...

They haven't worked for me, but you may have a bit more luck!

Marc
     
Rainy Day
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
May 5, 2002, 01:00 PM
 
Although this doesn't explain why you're seeing what you're seeing, re-setting the prompt to this should get it out of your face. I've always hated the default prompt anyhow, feeling it was pretty useless. Here's a prompt which is much more useful; give it a try and see if you like it better:

tcsh users (the default shell):
set prompt="${PWD} --&gt; "

bash users:
PS1='${PWD} --&gt; '
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
May 7, 2002, 11:31 AM
 
In bash, I use this prompt, which I like a lot:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
export PS1=<font color = red>"[\u@\h \w] "</font>
</font>[/code]

It ends up rendering like this:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>

[dshaw@flybook /usr/bin]

</font>[/code]
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 11:06 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,