当前位置:网站首页>杀死进程-查看防火墙状态
杀死进程-查看防火墙状态
2022-08-11 05:29:00 【十月一养猪120斤】
杀死指定进程
1、检查进程是否在运行:
查看指定端口运行状态:ps -ef|grep 端口名称
查看所有程序运行的pid:netstat -nap
查找指定端口的pid:netstat -anp |grep 端口名称
2、找出占用这个端口的进程,并且杀死:
kill -9 PID
事实上ps+kill-9 PID足已解决一般问题
防火墙状态
1:查看防火墙状态
systemctl status firewalld.service(开启Active: active (running)-关闭Active: failed (Result: timeout))
service iptables status
2:暂时关闭防火墙
systemctl stop firewalld.service
service iptables stop
3:永久关闭防火墙
systemctl disable firewalld.service
chkconfig iptables off
4:重启防火墙
systemctl enable firewalld.service
service iptables restart (6.0版本)
5:永久关闭后重启
//暂时还没有试过
chkconfig iptables on
6开启防火墙状态
systemctl start firewalld.service
7查看默认防火墙状态
firewall-cmd --state(关闭后显示not running,开启后显示running)
边栏推荐
猜你喜欢
随机推荐
Argparse模块 学习
Wonderful linkage | OpenMLDB Pulsar Connector principle and practical operation
端口的作用
Byte (byte) and bit (bit)
Visual studio2019 configuration uses pthread
Visual studio2019 配置使用pthread
无效的修订:3.18.1-g262b901-dirty
Day 83
OpenMLDB官网升级,神秘贡献者地图带你快速进阶
Jetpack use exception problem collection
mysql basic summary
127.0.0.1 connection refused
Day 76
2021-09-11 C language variables and memory allocation
helm安装
js learning advanced BOM part (pink teacher notes)
Simple mine sweeping in C language (with source code)
将一个excel文件中多个sheet页“拆分“成多个“独立“excel文件
智能风控中台设计与落地
Jetpack's dataBinding









