Linux查看服务基本命令

查看IP:

ip addr show

 

 

查看端口与服务:

netstat -anp

查看某个端口进程

netstat -anp | grep 8080

关闭某个进程

kill -9 进程ID

 

查看CPU 

top 

查看tomcat运行

ps -aux | grep tomcat

ps -ef | grep tomcat

查看springBoot运行状态

jobs -l

启动springBoot jar包

-- 后台运行

nohup java -jar 你的jar命名.jar > logs.log & 

切换root 

sudo -i 之后输入密码即可

CentOS7

查看防火墙信息

systemctl status firewalld

查看防火墙状态

firewall-cmd --state

关闭防火墙

systemctl stop firewalld.service

开启防火墙

systemctl start firewalld.service

posted on 2020-05-09 17:02  东子z  阅读(9201)  评论(0编辑  收藏  举报

导航