LINUX常用命令记录

时间:2020-08-14 23:18:14   收藏:0   阅读:79

1、判断端口是否开放

查到结果存在监听,则说明端口号已经开放

[root@zxone ~]# netstat -an | grep 8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN 

2、判断防火墙是否开启运行

[root@zxone ~]# service  iptables status
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.
[root@zxone ~]# firewall-cmd --list-all  #查看防火墙开启端口列表

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!