mirror of
https://github.com/Linux4Yourself/book.git
synced 2025-02-03 07:17:17 +08:00
17 lines
396 B
Markdown
17 lines
396 B
Markdown
|
```bash
|
||
|
cat > /etc/profile.d/dircolors.sh << "EOF"
|
||
|
# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
|
||
|
if [ -f "/etc/dircolors" ] ; then
|
||
|
eval $(dircolors -b /etc/dircolors)
|
||
|
fi
|
||
|
|
||
|
if [ -f "$HOME/.dircolors" ] ; then
|
||
|
eval $(dircolors -b $HOME/.dircolors)
|
||
|
fi
|
||
|
|
||
|
alias ls='ls --color=auto'
|
||
|
alias grep='grep --color=auto'
|
||
|
EOF
|
||
|
dircolors -p > /etc/dircolors
|
||
|
```
|