I can't enable prompt color in my terminal (Ubuntu 14.04 LTS).
Here's my .bashrc
:
force_color_prompt=yes
export LANGUAGE='en_US.UTF-8 git'
export HISTCONTROL=ignoreboth
#export HISTSIZE=100000
#export HISTFILESIZE=100000
# Eternal bash history.
# ---------------------
# Undocumented feature which sets the size to "unlimited".
# http://stackoverflow.com/questions/9457233/unlimited-bash-history
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
# Change the file location because certain bash sessions truncate .bash_history file upon close.
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
export HISTFILE=~/.bash_eternal_history
# Force prompt to write history after every command.
# http://superuser.com/questions/20900/bash-history-loss
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
# #########
# Some example functions
# function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }
export PATH=${PATH}:/home/louisro/android-sdk-linux/tools
export PATH=${PATH}:/home/louisro/android-sdk-linux/platform-tools
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=${JAVA_HOME}/bin:$PATH
export PATH=/usr/local/bin:$PATH
export NVM_DIR="/home/louisro/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
I guess, you don't have set a colour to your prompt. You can do this with the following syntax:
\e[x;ym $PS1 \e[m
To set a red colour prompt, type the following command:
add it to your
.bashrc
to make it permanent.Here is a list of available colours:
Note: You need to replace digit 0 with 1 to get light colour version. refer to this tutorial for more info. You may also take a look at this very good german explanation
This will enable color and will also enable color for some output such as for the output of make and ls.
Source your
~/.bashrc
file to apply the changes: