Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In bash, my default console prompt looked like this:

kit:~ Kit$

I do not know what I did to make it change to this:

112:~ Kit$

What caused the 112: to appear? I'm in a different network, where my computer has an IP address that begins with 112.. Is it because of that? Or something else?

share|improve this question

migrated from stackoverflow.com Jan 7 '12 at 16:44

This question came from our site for professional and enthusiast programmers.

    
Is it really part of the prompt? Isn't it just a last line printed from the previous command without a line end? As in echo -n 112: –  choroba Jan 7 '12 at 17:57
    
What's the output of hostname? –  Daniel Beck Jan 7 '12 at 21:50
add comment

3 Answers

The bash prompt is governed by the PS1 variable and it's hard to say what's going on without knowing what the variable is set to.

echo "$PS1" will show you its current value.

For more information type man bash and look under PROMPTING section.

share|improve this answer
    
He's on the same system, but on a different network (e.g. carried his laptop somewhere else). –  Daniel Beck Jan 7 '12 at 21:50
add comment

I don't know why it changed, but why not change it back? - look at this

Has this happened before, or is it an isolated incident? If it hasn't happened before, just change it back.

share|improve this answer
add comment

A simple solution is to change it back to the way it was. To change it back, add the following to your ~/.bashrc:

PS1='\w \u\$ '
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.