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 //禁止防火牆開機啓動

 

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