linux 零碎知识点

1、如何查看linux系统下,java的安装目录:

echo $JAVA_HOME
例如:

[root@ut23 hadoop]# echo $JAVA_HOME
/root/app/jdk1.8.0_51

2、查询java目录:

find / -name java
例如:

[root@ut23 bin]# find / -name java
/opt/hadoop/zookeeper-3.4.6/contrib/fatjar/src/java
/opt/hadoop/zookeeper-3.4.6/contrib/loggraph/src/java
...等等


3、查看java的执行路径:

which java
例如:

[root@ut23 bin]# which java
/root/app/jdk1.8.0_51/bin/java

4、查看java的版本:

java -version
例如:

[root@ut23 bin]# java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

你可能感兴趣的:(linux)