Marco Nie - kill https://blog.niekun.net/tag/kill/ zh-CN Wed, 16 Oct 2019 16:10:00 +0800 Wed, 16 Oct 2019 16:10:00 +0800 Linux 后台程序/端口占用查看及关闭 https://blog.niekun.net/archives/430.html https://blog.niekun.net/archives/430.html Wed, 16 Oct 2019 16:10:00 +0800 admin ps

查看当前所有后台进程:

ps -aux

2019-10-16T08:08:10.png

查看某个脚本进程:

ps -aux | grep "test.sh"

kill

关闭进程,通过ps命令查看进程号PID,然后执行:

kill %PID

lsof

查看当前端口是否被某个进程占用:

lsof -i:8000

Windows 查看端口占用参考:https://niekun.net/index.php/archives/922.html

]]>
0 https://blog.niekun.net/archives/430.html#comments https://blog.niekun.net/feed/tag/kill/archives/430.html