- 查看可执行程序位置, 例如java
先用which 找到最外层的连接, 一般在/usr/bin中
再用ls -l 追踪链接找到真正的文件
[root@localhost test]# which java
/usr/bin/java
[root@localhost test]# ls -l /usr/bin/java
lrwxrwxrwx. 1 root root 22 Oct 28 17:00 /usr/bin/java -> /etc/alternatives/java
[root@localhost test]# ls -l /etc/alternatives/java
lrwxrwxrwx. 1 root root 35 Oct 28 17:00 /etc/alternatives/java -> /usr/java/jdk1.8.0_131/jre/bin/java
[root@localhost test]# ls -l /usr/java/jdk1.8.0_131/jre/bin/java
-rwxr-xr-x. 1 root root 7734 Mar 15 2017 /usr/java/jdk1.8.0_131/jre/bin/java