0

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?

2 Answers 2

1

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.

1
  • It was ~/.bashrc. Thanks!
    – nigol
    Apr 16, 2012 at 20:37
3

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .