Skip to content

Centos

PS1 configuration

To make a global PS1 change for all users on a server.

cat <<EOF > /etc/profile.d/ecps1.sh
#edit this as you see fit
serverName="magento1"
export PS1='\[\e[1m\]$PWD\[\e[0m\]'"\n\[\033[38;5;1m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;9m\]$serverName\[$(tput sgr0)\] "

EOF

Note

You will need to close and reopen your SSH session to see the new prompt