linux/windows 下kill某个pid的进程

简介: 【linux环境】 方法1:截取进程pid,再kill ps -ef | grep java.endorsed.dirs | grep -v grep | cut -c10-15 | xargs kill -9  方法2: 1)找到linux下的进程pids ps -ef  | gre...
【linux环境】

方法1:截取进程pid,再kill

ps -ef | grep java.endorsed.dirs | grep -v grep | cut -c10-15 | xargs kill -9

 方法2:

1)找到linux下的进程pids

ps -ef  | grep eSight | grep -v grep | awk '{print $2}'

2)循环pids,kill -9 pid

 

【windows】

kill 命令行参数中带tomcat字符串的 java.exe 进程

方法1:

wmic process where (Name="java.exe" AND CommandLine like "%%tomcat%%") call terminate >nul 2>nul

 

方法2:

C:\Users\j00113584>wmic process where name="calc.exe" get Processid ProcessId 6848

C:\Users\j00113584>taskkill /F /PID 6848 成功: 已终止 PID 为 6848 的进程。

 

目录
相关文章
|
安全 Linux 生物认证
Nexpose 8.25.0 for Linux & Windows - 漏洞扫描
Nexpose 8.25.0 for Linux & Windows - 漏洞扫描
789 0
Nexpose 8.25.0 for Linux & Windows - 漏洞扫描
|
安全 Linux iOS开发
Binary Ninja 5.1.8104 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
Binary Ninja 5.1.8104 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
997 53
Binary Ninja 5.1.8104 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
|
安全 Linux 生物认证
Nexpose 8.24.0 for Linux & Windows - 漏洞扫描
Nexpose 8.24.0 for Linux & Windows - 漏洞扫描
764 17
Nexpose 8.24.0 for Linux & Windows - 漏洞扫描
|
Linux API iOS开发
Binary Ninja 4.2.6455 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
Binary Ninja 4.2.6455 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
934 14
Binary Ninja 4.2.6455 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
|
SQL 安全 Linux
Metasploit Pro 4.22.8-20251014 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.8-20251014 (Linux, Windows) - 专业渗透测试框架
744 1
Metasploit Pro 4.22.8-20251014 (Linux, Windows) - 专业渗透测试框架
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.95 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.95 (macOS, Linux, Windows) - 开源渗透测试框架
1484 1
Metasploit Framework 6.4.95 (macOS, Linux, Windows) - 开源渗透测试框架
|
安全 Linux 网络安全
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
689 2
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
|
安全 Ubuntu Linux
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
361 4
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
|
JSON 安全 Linux
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
443 1
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
783 1
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架

热门文章

最新文章