centos7常用命令总结(不断更新中)

netstat –nat    查看正在监听的端口

firewall-cmd  --permanent --query-port=22/tcp           // 查看防火墙22端口启用状态yes为打开,no为关闭

firewall-cmd  --permant --add-port=22/tcp                 //为防火墙打开22端口

firewall-cmd  --permant --list-ports            //查看防火墙所有已开启端口

systemctl stop firewalld.service  //关闭防火墙

systemctl disable firewalld.service //禁止防火墙开机启动

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章