{"id":683,"date":"2019-04-23T22:09:00","date_gmt":"2019-04-23T14:09:00","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=683"},"modified":"2023-12-04T02:43:33","modified_gmt":"2023-12-03T18:43:33","slug":"kill","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/kill","title":{"rendered":"kill\u547d\u4ee4 &#8211; \u6740\u6b7b\u8fdb\u7a0b"},"content":{"rendered":"\n<p>kill\u547d\u4ee4\u7684\u529f\u80fd\u662f\u6740\u6b7b\uff08\u7ed3\u675f\uff09\u8fdb\u7a0b\u3002Linux\u7cfb\u7edf\u4e2d\u5982\u9700\u7ed3\u675f\u67d0\u4e2a\u8fdb\u7a0b\uff0c\u65e2\u53ef\u4ee5\u4f7f\u7528\u5982service\u6216systemctl\u8fd9\u6837\u7684\u7ba1\u7406\u547d\u4ee4\u6765\u7ed3\u675f\u670d\u52a1\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528kill\u547d\u4ee4\u76f4\u63a5\u7ed3\u675f\u8fdb\u7a0b\u4fe1\u606f\u3002 <\/p>\n\n\n\n<p>\u5982\u4f7f\u7528kill\u547d\u4ee4\u540e\u8fdb\u7a0b\u5e76\u6ca1\u6709\u7ed3\u675f\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u4fe1\u53f79\u8fdb\u884c\u5f3a\u5236\u6740\u6b7b\u52a8\u4f5c\u3002<\/p>\n\n\n\n<p><strong>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>kill \u53c2\u6570 \u8fdb\u7a0b\u53f7<\/p>\n\n\n\n<p><strong>\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>-a<\/td><td>\u4e0d\u9650\u5236\u547d\u4ee4\u540d\u4e0e\u8fdb\u7a0b\u53f7\u7684\u5bf9\u5e94\u5173\u7cfb<\/td><td rowspan=\"2\">&nbsp;<\/td><td>-p<\/td><td>\u4e0d\u53d1\u9001\u4efb\u4f55\u4fe1\u53f7<\/td><\/tr><tr><td>-l<\/td><td>\u663e\u793a\u7cfb\u7edf\u652f\u6301\u7684\u4fe1\u53f7\u5217\u8868<\/td><td>-s<\/td><td>\u8bbe\u7f6e\u5411\u8fdb\u7a0b\u53d1\u9001\u7684\u4fe1\u53f7<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u53c2\u8003\u793a\u4f8b<\/strong><\/p>\n\n\n\n<p>\u5217\u51fa\u7cfb\u7edf\u652f\u6301\u7684\u5168\u90e8\u4fe1\u53f7\u5217\u8868\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# kill -l \r\n 1) SIGHUP  \t  2) SIGINT \t    3) SIGQUIT   \t 4) SIGILL \t   5) SIGTRAP \r\n 6) SIGABRT \t  7) SIGBUS \t    8) SIGFPE \t\t 9) SIGKILL \t  10) SIGUSR1 \r\n11) SIGSEGV \t 12) SIGUSR2 \t   13) SIGPIPE \t14) SIGALRM \t  15) SIGTERM \r\n16) SIGSTKFLT \t 17) SIGCHLD \t   18) SIGCONT \t19) SIGSTOP \t  20) SIGTSTP \r\n21) SIGTTIN \t 22) SIGTTOU \t   23) SIGURG \t\t24) SIGXCPU \t  25) SIGXFSZ \r\n26) SIGVTALRM \t 27) SIGPROF \t   28) SIGWINCH \t29) SIGIO \t  30) SIGPWR \r\n31) SIGSYS \t 34) SIGRTMIN \t   35) SIGRTMIN+1 \t36) SIGRTMIN+2  37) SIGRTMIN+3 \r\n38) SIGRTMIN+4 \t 39) SIGRTMIN+5  40) SIGRTMIN+6 \t41) SIGRTMIN+7  42) SIGRTMIN+8 \r\n43) SIGRTMIN+9 \t 44) SIGRTMIN+10 45) SIGRTMIN+11\t46) SIGRTMIN+12 47) SIGRTMIN+13 \r\n48) SIGRTMIN+14\t 49) SIGRTMIN+15 50) SIGRTMAX-14\t51) SIGRTMAX-13 52) SIGRTMAX-12 \r\n53) SIGRTMAX-11\t 54) SIGRTMAX-10 55) SIGRTMAX-9\t56) SIGRTMAX-8  57) SIGRTMAX-7 \r\n58) SIGRTMAX-6 \t 59) SIGRTMAX-5  60) SIGRTMAX-4\t61) SIGRTMAX-3  62) SIGRTMAX-2 \r\n63) SIGRTMAX-1 \t 64) SIGRTMAX \r<\/pre>\n\n\n\n<p>\u7ed3\u675f\u67d0\u4e2a\u6307\u5b9a\u7684\u8fdb\u7a0b\uff08\u6570\u5b57\u4e3a\u5bf9\u5e94\u7684PID\u503c\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# kill 518 <\/pre>\n\n\n\n<p>\u5f3a\u5236\u7ed3\u675f\u67d0\u4e2a\u6307\u5b9a\u7684\u8fdb\u7a0b\uff08\u6570\u5b57\u4e3a\u5bf9\u5e94\u7684PID\u503c\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# kill -9 518<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>kill\u547d\u4ee4\u7684\u529f\u80fd\u662f\u6740\u6b7b\uff08\u7ed3\u675f\uff09\u8fdb\u7a0b\u3002Linux\u7cfb\u7edf\u4e2d\u5982\u9700\u7ed3\u675f\u67d0\u4e2a\u8fdb\u7a0b\uff0c\u65e2\u53ef\u4ee5\u4f7f\u7528\u5982service\u6216syste [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-683","post","type-post","status-publish","format-standard","hentry","category-system"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=683"}],"version-history":[{"count":26,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/683\/revisions"}],"predecessor-version":[{"id":16640,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/683\/revisions\/16640"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}