Tracking any binary on linux
2 min readMay 5, 2017
Let’s say you need to find out where your java installation is on linux.
Get Clerton Araujo’s stories in your inbox
Join Medium for free to get updates from this writer.
First, the hard way:
which javaPress enter or click to view image in full size![]()
Then, navigate through the links:
ls -l /usr/bin/javaPress enter or click to view image in full size![]()
And again…
ls -l /etc/alternatives/javaPress enter or click to view image in full size![]()
And again… Until it finds itself!
ls -l /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javaPress enter or click to view image in full size![]()
ls -l /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java is the same link searchedGreat! Now the easy way:
readlink -f $(which java)




