Quote:
Originally posted by whaase
I wanted my ls command to have color, so I entered the following command in the /home/USER/.bashrc file
alias "ls=ls --color=always"
Worked great. But I did the same for root in the /root/.bashrc
alias "ls=ls --color=always"
It won't work... I've tried the following aswell:
alias 'ls=ls --color'
alias ls=ls --color
alias "ls=ls --color"
Nothing... if I type it in the shell it works.... Anyone know where I'm messing up?
Walter
|
Here is what I have in my /root/.bashrc:
Code:
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto -h'
eval `dircolors`
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
You will also want to check in your /root/.profile for this:
Code:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
To make sure the .bashrc is being sourced when you go to root.