In bash (I am using Ubuntu 12.04) I get colored outputs either as root (after sudo su) or as a normal user.
I checked (after reading this post) the files .bashrc for normal user and superuser and the options related to color are enabled for ls in alias ls='ls --color=auto' which makes sense.
But when using sudo ls I get no colored output at all. Why is that? and how to enable it permanently?
sudo -i ls.sudo -i lssudo pwdandsudo -i pwd.sudo pwdhas/home/useras output.sudo -i pwdhas/rootalias sudo='sudo 'to your ~/bashrc. Source your ~/.bashrc or logout and login again. After that it should work withsudo ls.