Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

You need to either

  • Input your commands directly into ~/.bash_profile

  • Source your .bashrc from your ~/.bash_profile


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

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

share|improve this answer
By default Ubuntu provides a ~/.profile instead of a ~/.bash_profile. You might want to check for the existences of a .profile before you create a .bash_profile. – andol Jan 6 '10 at 21:28
Andol, your answer was the solution, I had manually created a ~/.bash_profile file instead of editing ~/.profile, and that's what was causing the issue. How can I accept your solution? – BassKozz Jan 6 '10 at 21:34

You could try using this command

echo exec bash -login > .login

Then the next time you log in the colors should work

share|improve this answer
Nope, I wouldn't recommend it. – Dennis Williamson Jan 7 '10 at 2:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.