FG
💻 Software

"which" and "whereis"

Fresh5 days ago
Mar 15, 20262036 views
Confidence Score0%
0%

Problem

On my linux box, after typing , I get /usr/bin/java After typing , I get java: /usr/bin/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz What are the meanings of these two results? When setting up the JAVA_HOME, which one should I use?

Error Output

which java

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: "which" and "whereis"

Low Risk

From which/whereis differences I'd use as it shows you where just the binary is as I assume that is all you need. However Java could be installed somewhere else and would not report it as it only searches for an executable or script in the directori…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment