sudo gedit /etc/profile
export JAVA_HOME=/home/nescafe/temp/jdk1.8.0_121
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
sudo dpkg-reconfigure dash #no
ls -l `which sh`
source /etc/profile
nescafe@ubuntu:~/temp/apache-tomcat-8.5.12/bin$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
#装SSH
sudo apt-get install openssh-server
nescafe@ubuntu:~$ sudo ps -e |grep ssh
[sudo] password for nescafe:
21035 ? 00:00:00 sshd
21137 ? 00:00:00 sshd
21154 ? 00:00:00 sshd