切换到Linux某个用户
su - username
查看操作系统内核版本
cat /proc/version
搜索所有java路径
find / -name java
修改环境变量配置文件,添加jdk临时变量
vim ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
JAVA_HOME=/usr/java/jdk1.8.0_212-amd64
PATH=$JAVA_HOME/bin:$PATH:$HOME/.local/bin:$HOME/bin
export PATH