bash ls --color alias?
It works in root but not as normal user. Have tried to change every bashrc file locate could find, I even tried copying /root/.bashrc to /home/tripmix/.bashrc. Anyone know what I'm doing wrong?
|
are you trying to set it by default? you could just do the following in you home .bashrc:
alias ls="ls --color" |
That's what I did and it wont work.
.bashrc in home dir This is my first try: eval `dircolors -b` alias ls='ls --color=auto' alias dir='ls --color=auto --format=vertical' alias vdir='ls --color=auto --format=long' Second try: export LS_OPTIONS='--color=auto' eval `dircolors` alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA' Second one is a copy of .bashrc in /root and it works when I log in as root or su. |
must be something debian specific? thats worked for every distro I've ever used. Did you try asking in the debain forums - probably someone there who knows.
|
Someone here must use Debian. Can't go to the Debian forum now, I have to get smarter first :p . Don't want to look stupid there :D
|
You can use the bash command source to apply the settings in your .bashrc to your current bash session - source ~/.bashrc. Try it. If it does work, but your settings aren't applied in new terminals or when logging in through ssh (or equivalent), make sure your ~/.bashrc is parsed every time you log in. Do this by adding this to your ~/.bash_profile:
Code:
if [ -f ~/.bashrc ] Håkan |
See what your TERM environment variable is set to. For dircolors to work, you must use a term that supports color. You could just look and see what root's is and use it for your user.
as root: echo $TERM as user: export TERM=whatever Probably either xterm or xterm-color. |
Thanks a lot hw-tph that did it.
DaHammer: I was only having problems whit normal CLI not a term but thanks anyway. |
All times are GMT -5. The time now is 05:17 PM. |