为什么ls
命令在 Ubuntu 14.04.2 中不显示颜色?以前它可以工作。
我的别名报告:
alias cp='cp -i'
alias gdb='gdb -q'
alias ll='ls -l --color=auto'
alias mv='mv -i'
alias rm='rm -i'
# enable color support of ls and also add handy aliases
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# ~/.bash_aliases, instead of adding them here directly.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
答案1
您的别名是“ ll
”而不是“ ls
”,请使用:
alias ls='ls --color=auto'