I've changed ~/.bashrc file of root and my own account.

The problem is (maybe because of my encypted home directory): when I log in to my normal account: no color, when I log in as root: color! But then no DIRECT access to encrypted directory.

Also when I log in to my normal account and type:

su no

(no is my normal account username) I get color!

Where is the other place that color gets set?

I use PS1 all the time and change it based on what's happening in my system... Its very nice, but when i log in as my normal account I do NOT get color.

I'm currently executing a one liner command to search every file for PS1= (I'm sure my command is wrong, but whatever):

echo "$(find *)" | xargs grep PS1 | grep PS1

Correct command was:

echo "$(find *)" | xargs grep .* | grep PS1=
  • That one-liner is hideous, use grep -R 'PS1=' ./ – Steven K Nov 16 '13 at 20:56
  • Haha my first weeks on linux:) but i think Bash regular expressions are hideous ^.^ – Leathan Nov 19 '13 at 14:43
cat /etc/bash.bashrc | grep PS1=

pico /etc/bash.bashrc

Edit the line you saw with first command.

My problem is that .bashrc was not working and apparently a default of /etc/bash.bashrc is used even prior authentication. Modifying this file solved my problem totally .

  • su -s /bin/sh no – Joshua Jul 21 '16 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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