取消vim中搜索后文本高亮:
:nohl
修改主机名称:
vim /etc/hostname
查看java进程
jps
jar包启动脚本
cd /opt/deploy/websockettest/
nohup java -Dfile.encoding=utf-8 -Xms256m -Xmx512m -jar /opt/deploy/websockettest/websocket*.jar 2>&1 &
jar包停止脚本
#!/bin/bash
pid=`ps -ef | grep websocket_springboot.jar | grep -v grep | awk '{print $2}'`
echo "the pid of the process is ${pid}"
if [ -z "${pid}" ]
then
echo "the process was already killed!"
else
kill -9 ${pid}
echo "kill process complete!"
fi
查看是系统是ubuntu还是CentOS
lsb_release -a
查看当前主机ip
hostname -I