Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The computer who's prompt I'm trying to copy:

[root@CompanyName-LAMP-DEV:/current/path]$

We'll call that computer computer A.

The prompt my computer - computer B - currently has:

[root@ip-x-x-x-x /current/path]#

Both are using bash. I copied the /etc/bashrc file from computer A to computer B to no avail. If I do echo $HOSTNAME both are of the form ip-x-x-x-x.

Any ideas?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

The prompt is in the $PS1 environmental variable (which will be set in /etc/bashrc, or ~/.bashrc). Do a echo $PS1 on either machine, compare and constrast.

share|improve this answer
    
It was ~/.bashrc. Thanks! –  nigol Apr 16 '12 at 20:37
add comment

Prompts are set by environment variables in bash including PS1 and PS2. If the variables are defined in the configuration files you copied over make sure you have sourced them with the dot command (. .profile) or logout and login to make sure they are reloaded.

You can check their values with shell commands like: echo PS1="$PS1" PS2="$PS2".

Ref: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html

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.