Tracking any binary on linux
Let’s say you need to find out where your java installation is on linux.
First, the hard way:
Then, navigate through the links:
ls -l /usr/bin/java
ls -l /etc/alternatives/java
And again… Until it finds itself!
ls -l /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Great! Now the easy way:
readlink -f $(which java)