1打开文件,添加如下一段话 vim ~/.bashrc alias grep='grep --color' 2退出保存 source ~/.bashrc 只有执行grep命令搜索的时候,关键字就会有颜色了 也可以临时查询的时候,添加颜色 ps -ef | grep --color "timer" null 相关文章: 2022-12-23 2021-06-19 2022-12-23 2021-05-20 2022-12-23 2021-08-03 2021-06-30