LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   No color for ls -l after being root on bash shell (https://www.linuxquestions.org/questions/slackware-14/no-color-for-ls-l-after-being-root-on-bash-shell-802231/)

lkraemer 02-15-2013 06:15 AM

I found this shortly after I installed Slackware 14 (32 Bit)

REF:
http://gnu-linux-slackware.blogspot....-ls-for-x.html

I have noticed that executing ls command in "Terminal" and "Xterm" does not give me colorful output as in "Konsole".
To get colorful output in these X terminals in bash, add below lines to your ~/.bashrc file and restart X terminal.

# enable color support of ls and add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'
fi

To enable the same function for your root shell, add above lines to /root/.bashrc file.



TERMINAL COMMAND as SUDO

Color Schemes for ls command

Color File type
blue directories
red compressed archives
white text files
pink images
cyan links
yellow devices
green executables
flashing red broken links


Larry


All times are GMT -5. The time now is 09:06 AM.