Most effective way to change Linux command prompt for all users?
You should probably export PS1. Instead of editing a user's bashrc, you should edit the system bashrc: a user should be able to override a prompt with their choice.
Secondly, to distribute the file use either scp or clusterssh. If you set up a rsa key you don't even need to enter your password more than once for scp:
eval `ssh-agent`
ssh-add
for h in `cat ~/hostlist`; do
scp ~/newbashrc ${h}:/etc/bashrc
done
eval `ssh-agent -k`
you can create an executable script in the directory /etc/profile.d/, for example: /etc/profile.d/custom_prompt.sh, with this content:
#!/bin/sh
export PROMPT_COMMAND=’export PS1="[\e[0;35m][\u \t \h \W]\$ [\e[0m]"‘
With this method, you don’t need to modify any file in order to change the bash prompt for all the users.