安装SSH服务
-
sudo apt install openssh-server
-
sudo service ssh start
ps -aux | grep ssh 判断是否开启成功
ubuntu18.04 install jdk
- sudo apt install default-jdk
- java -version
Installing OpenJDK 8
- sudo apt update
- sudo apt install openjdk-8-jdk
- 设置JAVA_HOME环境变量 sudo update-alternatives --config java 查看java默认安装路径
- 如为: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
- sudo nano /etc/environment
- JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
- source /etc/environment
- echo $JAVA_HOME