Ssh – Ubuntu-Server bash colors not appearing on login

bashcolorshellssh

I am running Ubuntu Server 8.04 (hardy), and when I login remotely i can't see the colors when using ls, however after I type "bash" into the shell I see colors, I've already checked my .bashrc and all the colors are enabled by default (colors=auto), and I've checked "echo $SHELL" and "which bash", and they both report /bin/bash however as I already mentioned I don't see colors until I enter "bash" into shell
Why might this be?

Best Answer

You need to either

  • Input your commands directly into ~/.bash_profile

  • Source your .bashrc from your ~/.bash_profile

e.g.

if [ -f ~/.bashrc ]; then
  source ~/.bashrc
fi

.bashrc is used for interactive shells, .bash_profile is used for login shells.