Linux杀死进程的方法

查看进程状态:

命令:

ps -ef;

ps -aux;

ps -ef | grep (进程名):只查看指定进程名进程的状态

pgrep (进程名):查看指定进程名进程状态

pkill -9 (进程名):杀死指定进程名进程

kill -s 9 (进程号):-s 9 制定了传递给进程的信号是9,即强制、尽快终止进程。

killall -9 (进程名):杀死指定进程名进程。(如果给出的进程名不完整,killall会报错。pkill或者pgrep只要给出进程名的一部分就可以终止进程)


各种信号及其用途:

SignalDescriptionSignal number on Linux x86[1]
SIGABRTProcess aborted6
SIGALRMSignal raised by alarm14
SIGBUSBus error: "access to undefined portion of memory object"7
SIGCHLDChild process terminated, stopped (or continued*)17
SIGCONTContinue if stopped18
SIGFPEFloating point exception: "erroneous arithmetic operation"8
SIGHUPHangup1
SIGILLIllegal instruction4
SIGINTInterrupt2
SIGKILLKill (terminate immediately)9
SIGPIPEWrite to pipe with no one reading13
SIGQUITQuit and dump core3
SIGSEGVSegmentation violation11
SIGSTOPStop executing temporarily19
SIGTERMTermination (request to terminate)15
SIGTSTPTerminal stop signal20
SIGTTINBackground process attempting to read from tty ("in")21
SIGTTOUBackground process attempting to write to tty ("out")22
SIGUSR1User-defined 110
SIGUSR2User-defined 212
SIGPOLLPollable event29
SIGPROFProfiling timer expired27
SIGSYSBad syscall31
SIGTRAPTrace/breakpoint trap5
SIGURGUrgent data available on socket23
SIGVTALRMSignal raised by timer counting virtual time: "virtual timer expired"26
SIGXCPUCPU time limit exceeded24
SIGXFSZFile size limit exceeded25
参考:http://blog.csdn.net/andy572633/article/details/7211546

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值