1 修改~/.bashrc (修改这个文档只会影响当前用户) 增加 alias='grep --color' 2 执行source ~/.bashrc或. ~/.bashrc 使其马上生效,不然需要重新登录