Better Terminal Prompt

Set terminal prompt color and style, green user, red root (set elsewhere), machine, and working directory. Place in your .profile or .bash_profile:

if [ "$TERM" = "xterm-color" ]; then
        C1="[33[0;32m]"
        C2="[33[1;0m]"
        export PS1="${C1}u${C2}@h: W $ "
fi

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>