linux杀死进程方法

时间:2024-05-31 14:36:50

方法一:
根据pid
ps -aux|grep 你的进程
方法二:
删除pid文件
[root@localhost ~]# /etc/init.d/redis_6380 start
/var/run/redis_6380.pid exists, process is already running or crashed
[root@localhost ~]# ps -a|grep 6380
[root@localhost ~]# rm -rf /var/run/redis_6380.pid #直接删除该pid文件
[root@localhost ~]# /etc/init.d/redis_6380 start
Starting Redis server...
[root@localhost ~]# netstat -tlnp|grep 6380
tcp 0 0 0.0.0.0:6380 0.0.0.0:* LISTEN 122
06/redis-server tcp6 0 0 :::6380 :::* LISTEN 122
06/redis-server [root@localhost ~]#