如果命令 which 和whereis 都找不到安装目录,可使用以下办法 比如redis ps -ef|grep redis 得到了进程号 4133 然后 ls -l /proc/4133/cwd 得到安装路径