linux删除指定端口的进程
用該命令可以找出使用端口的進(jìn)程??蓪懩_本監(jiān)控,停止端口及進(jìn)程~
例如:fuser -n tcp 3306 | ps aux | grep 24594 | grep -v "grep"
若要將使用該端口的進(jìn)程kill
例如:fuser -k -n tcp 3306
usage: fuser [ -a | -s ] [ -n space ] [ -signal ] [ -kimuv ] name ...
[ - ] [ -n space ] [ -signal ] [ -kimuv ] name ...
fuser -l
fuser -V
-a display unused files too
-k kill processes accessing that file
-i ask before killing (ignored without -k)
-l list signal names
-m mounted FS
-n space search in the specified name space (file, udp, or tcp)
-s silent operation
-signal send signal instead of SIGKILL
-u display user ids
-v verbose output
-V display version information
-4 search IPv4 sockets only
-6 search IPv6 sockets only
- reset options
udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]
轉(zhuǎn)載于:https://www.cnblogs.com/win-and-first/archive/2013/03/11/linux1.html
總結(jié)
以上是生活随笔為你收集整理的linux删除指定端口的进程的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JS 常见事件
- 下一篇: linux的文件io操作(转)