I tried the fish shell, and love the fact that it does syntax colouring in the shell itself:
Is there some way to do this in bash?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Real time syntax coloring is a lot of work, especially with shells whose syntax is trickier than fish's. Only fish has it out of the box.
Zsh has syntax coloring if you install the zsh-syntax-highlighting add-on.
I'm not aware of any effort to do this with bash.
You can edit the bash.bashrc file in the /etc directory. You will want to change $PS1 (primary shell prompt) and maybe $PS2 (secondary shell prompt).
Check out this link for the how-to, it helped me set mine: https://help.ubuntu.com/community/CustomizingBashPrompt