翘首企盼是什么意思| 血压是什么| 枭印什么意思| 参苓白术散治什么病| 消心痛又叫什么| 明朝前面是什么朝代| amv是什么意思| 十九朵玫瑰花代表什么意思| 开小灶是什么意思| 什么是春梦| 川芎有什么功效| 迪拜为什么那么有钱| 小便发黄是什么原因引起的| 6月19日是什么日子| 神经病和精神病有什么区别| 什么程度才需要做胃镜| 小儿外科主要看什么病| 乳腺导管局限性扩张是什么意思| 九层塔是什么菜| 轮状胎盘是什么意思| 用什么锅炒菜对人体健康更有益| 根充是什么意思| 奇花异草的异什么意思| 公元前3000年是什么朝代| 隐身是什么意思| 肾错构瘤是什么原因引起的| 冲虎煞南是什么意思| 反酸是什么原因| 女人大腿粗代表什么| 胃疼喝什么粥| gbs筛查是什么| 唯心是什么意思| 入心是什么意思| 草莓是什么季节的水果| 2月8日什么星座| 什么得什么词语| 腿外侧是什么经络| 龟头炎用什么软膏最好| 下午五点到七点是什么时辰| 左侧上颌窦炎症是什么意思| 白羊女喜欢什么样的男生| 蓝桉什么意思| 认知是什么| 羊水为什么叫羊水| 5月27日什么星座| 神经大条是什么意思| 血压低吃什么药好| 农历正月初一是什么节| 吃什么最补脑| 漫展是干什么的| 终而复始什么意思| Q什么意思| rap是什么意思| 眼睛发痒是什么原因| 梦见涨水是什么征兆| 肾脏挂什么科| 口臭吃什么药效果最好| 邹去掉耳朵旁读什么| 月经前一周是什么期| 霉菌是什么东西| lofter是什么意思| 高高的什么| 黑鸟是什么鸟| 惧内什么意思| 美丽的近义词是什么| 为什么会得卵巢肿瘤| 褥疮是什么| 5月23是什么星座| 缺铁性贫血吃什么补血最快| 做梦掉牙齿是什么预兆| 女人怕冷是什么原因| 日柱将星是什么意思| 线差是什么意思| 呦西是什么意思| 手麻木是什么引起的| 为什么早上起床头晕| 乳糖不耐受什么意思| 什么是作风建设| 长期便秘吃什么药好| 蛇字五行属什么| 肌酐高是什么原因造成的| 梦见干活是什么意思| 美女的胸长什么样| 抑郁症吃的药叫什么| 一年四季穿棉衣是什么生肖| 关系是什么意思| 肌酐是什么指标| 梦见冥币是什么意思| 来月经不能吃什么| 俄罗斯是什么人种| 工装是什么| 3月份是什么季节| mc是什么| 均字五行属什么| 什么是大健康产业| 大咖什么意思| 乐不思蜀什么意思| 什么童话| 18k金和24k金有什么区别| 新生儿头发稀少是什么原因| 驿是什么意思| 诅咒是什么意思| 小郡肝是什么| 骨赘形成是什么意思| 空腹吃柿子有什么危害| 螨虫长什么样子图片| 人为什么会做噩梦| 复古红是什么颜色| 骨质密度不均匀是什么意思| 发改局是做什么的| 8月23号是什么星座| 结晶是什么| 什么是溶血性疾病| april什么意思| 梦见好多鱼是什么意思| 蚂蚁属于什么动物| 胆囊炎吃什么水果好| 性激素六项什么时候查最准确| 负距离接触是什么意思| 难以入睡是什么原因引起的| 扁桃体发炎用什么药| 口腔溃疡是什么原因| 做梦梦见鱼是什么意思| 荠菜长什么样| 伸舌头锻炼有什么好处| 为什么招蚊子咬| 坦诚相待是什么意思| 放屁多什么原因| 拍拖是什么意思| 脑出血什么原因引起的| 巡演是什么意思| 古代广东叫什么| 嘴唇发乌是什么原因| 梦见摘枣吃枣是什么意思| 东北话篮子是什么意思| 肌酸激酶偏低是什么原因| 菠菜炒什么好吃| 麻雀吃什么| 血糖高喝什么牛奶好| 法脉是什么意思| 醪糟是什么| 重症肌无力是什么病| 宫颈糜烂用什么药比较好| 七七事变是什么生肖| 五月十三日是什么星座| 血糖高什么不能吃| 颈椎退行性变是什么意思| 古代的天花是现代的什么病| penis什么意思| 手臂酸痛是什么原因| 什么是体制内| vgr100是什么药| 警示是什么意思| 画画用什么铅笔| 人丁兴旺是什么意思| 贫血会引起什么症状| 多肽是什么意思| 心气虚吃什么食物补| 子宫内膜薄吃什么| 姊妹什么意思| 一马平川是什么生肖| 激情什么意思| 解说是什么意思| 鲽鱼是什么鱼| 尿酸520属于什么水平| 下腹疼是什么原因| 酸性体质是什么意思| 吃什么对肺好| 边界是什么意思| 肾衰竭吃什么好| 莒姬是什么位分| 吃什么排铜最快| 虎什么熊什么| 寓是什么意思| 艾滋病是什么| 附子理中丸治什么病| 1997年的牛是什么命| 弱碱水是什么水| 产后抑郁症有什么表现症状| 猪横脷是什么| 梗阻性黄疸是什么病| 鸭肉煲汤放什么材料好| 燃气泄露是什么味道| 地图舌是什么原因引起的| 尿细菌高是什么原因| 鹿晗有什么歌| 古代医院叫什么| 赵国是现在的什么地方| 子宫内膜炎吃什么药| 2000年是什么生肖| 可逆是什么意思| 飞机上可以带什么吃的| s925是什么金| 查输卵管是否堵塞要做什么检查| 什么是满汉全席| 大便一粒粒的是什么原因| 拔罐之后要注意什么| 蓬灰是什么东西| 心律不齐房颤吃什么药| 阳虚什么症状| 95年是什么命| 黄瓜什么时候种| 代谢是什么意思| 梦到蛇是什么征兆| 7月23是什么星座| 路亚竿什么品牌好| 破釜沉舟是什么意思| 肝内低密度影是什么意思| 打板是什么意思| 狗生小狗前有什么征兆| 什么是冤亲债主| 小暑是什么时候| 荨麻疹有什么忌口| 什么车最长脑筋急转弯| 紫苏什么味道| 人的脂肪是什么颜色| 抱恙是什么意思| 王维字什么| 什么的琴声| 小蜘蛛吃什么| 心衰竭是什么病| 小便发黄是什么原因| 肾造瘘是什么意思| 乙肝检查挂什么科| 生殖细胞是什么| 什么是手性碳原子| 电器着火用什么灭火器| 哈吉是什么意思| 为什么蛋皮会痒| 无什么于事| 小儿急性喉炎吃什么药| zara是什么品牌| uva是什么意思| 曹操是什么生肖| 什么是业障| 黄精有什么作用和功效| 惊弓之鸟是什么意思| 打呼噜吃什么药最管用| abcd是什么意思| 闰年是什么| 感知能力是什么意思| swag是什么意思| 入定是什么意思| 什么叫因果| 非典型腺细胞是什么意思| 尿检潜血是什么意思| 热伤风吃什么药| 头麻是什么病的前兆| 肠系膜淋巴结炎吃什么药| 三问表是什么意思| 摸摸头是什么意思| 舌头上有裂纹是什么原因| 胃不舒服吃什么| 什么是益生菌| 肾虚是什么症状| 正月是什么意思| 手指甲变薄是什么原因| 一般什么人容易得甲亢| 梨花是什么颜色的| 慈字五行属什么| 戒手淫有什么好处| 睡眠障碍是什么原因引起的| 经常熬夜吃什么好| 梦见自己给自己剪头发是什么意思| 百度Jump to content

[视频]李克强主持召开国务院常务会议

From Wikipedia, the free encyclopedia
(Redirected from Taskkill)
kill
Original author(s)AT&T Bell Laboratories
Developer(s)Various open-source and commercial developers
Initial releaseFebruary 1973; 52 years ago (1973-02)
Operating systemUnix, Unix-like, Plan 9, Inferno, OS-9, Windows, ReactOS, Singularity, IBM i
PlatformCross-platform
TypeCommand
LicenseReactOS: LGPL-2.1-or-later
百度 同时,气是无形的,需以有形之血为载体,存在于血液中,得到血液的滋养,气旺而生血。

In computing, kill is a command that is used in several popular operating systems to send signals to running processes.

Implementations

[edit]

Unix and Unix-like

[edit]

In Unix and Unix-like operating systems, kill is a command used to send a signal to a process. By default, the message sent is the termination signal, which requests that the process exit. But kill is something of a misnomer; the signal sent may have nothing to do with process killing. The kill command is a wrapper around the kill() system call, which sends signals to processes or process groups on the system, referenced by their numeric process IDs (PIDs) or process group IDs (PGIDs). kill is always provided as a standalone utility as defined by the POSIX standard. However, most shells have built-in kill commands that may slightly differ from it.[1][2]

There are many different signals that can be sent (see signal for a full list), although the signals in which users are generally most interested are SIGTERM ("terminate") and SIGKILL ("kill"). The default signal sent is SIGTERM. Programs that handle this signal can do useful cleanup operations (such as saving configuration information to a file) before quitting. However, many programs do not implement a special handler for this signal, and so a default signal handler is called instead. Other times, even a process that has a special handler has gone awry in a way that prevents it from properly handling the signal.

All signals except for SIGKILL and SIGSTOP ("stop") can be "intercepted" by the process, meaning that a special function can be called when the program receives those signals. The two exceptions SIGKILL and SIGSTOP are only seen by the host system's kernel, providing reliable ways of controlling the execution of processes. SIGKILL kills the process, and SIGSTOP pauses it until a SIGCONT ("continue") is received.[3]

Unix provides security mechanisms to prevent unauthorized users from killing other processes. Essentially, for a process to send a signal to another, the owner of the signaling process must be the same as the owner of the receiving process or be the superuser.

The available signals all have different names, and are mapped to certain numbers. The specific mapping between numbers and signals can vary between Unix implementations. SIGTERM is often numbered 15 while SIGKILL is often numbered 9.

Examples

[edit]

A process can be sent a SIGTERM signal in four ways (the process ID is '1234' in this case):

kill 1234
kill -s TERM 1234
kill -TERM 1234
kill -15 1234

The process can be sent a SIGKILL signal in three ways:

kill -s KILL 1234
kill -KILL 1234
kill -9 1234

Other useful signals include HUP, TRAP, INT, SEGV and ALRM. HUP sends the SIGHUP signal. Some daemons, including Apache and Sendmail, re-read configuration files upon receiving SIGHUP, so the kill command may be used for this too. A SIGINT signal can be generated very simply by pressing CTRL+C in most Unix shells. It is also common for CTRL+Z to be mapped to SIGTSTP ("terminal stop"), and for CTRL+\ (backslash) to be mapped to SIGQUIT, which can force a program to do a core dump.

[edit]
  • killall - on some variations of Unix, such as Solaris, this utility is automatically invoked when the system is going through a shutdown. It behaves much like the kill command above, but instead of sending a signal to an individual process, the signal is sent to all processes on the system. However, on others such as IRIX, Linux, and FreeBSD, an argument is supplied specifying the name of the process (or processes) to kill. For instance, to kill a process such as an instance of the XMMS music player invoked by xmms, the user would run the command killall xmms. This would kill all processes named xmms, and is equivalent to kill `pidof xmms` on systems like Solaris.
  • pkill - signals processes based on name and other attributes. It was introduced in Solaris 7 and has since been reimplemented for Linux, NetBSD and OpenBSD. pkill makes killing processes based on their name much more convenient: e.g. to kill a process named firefox without pkill (and without pgrep), one would have to type kill `ps --no-headers -C firefox -o pid` whereas with pkill, one can simply type pkill firefox.
  • xkill - if called without any parameters, the mouse cursor changes from an arrow to an "x" icon, and the user can click on a window to force the X server to close the connection with the client owning the window. This often causes the process to terminate when it detects that its connection to the X server has been closed.

Microware OS-9

[edit]

The kill command is also available as a shell builtin in the OS-9 shell. It is used to kill another process by process ID.[4]

Stop the process with the process ID "7":

$ kill 7

Microsoft Windows and ReactOS

[edit]
The taskkill command on Microsoft Windows

In Microsoft's command-line interpreter Windows PowerShell, kill is a predefined command alias for the Stop-Process cmdlet.

Microsoft Windows XP, Vista and 7 include the command taskkill[5] to terminate processes. The usual syntax for this command is taskkill /im "IMAGENAME". An "unsupported" version of kill was included in several releases of the Microsoft Windows Resource Kits available for Windows 98.[6]

GNU versions of kill have been ported via Cygwin and run inside of the Unix environment subsystem that Microsoft Windows Services for UNIX provides (Microsoft acquired Windows Services for Unix wholesale via their purchase of Softway Systems and their Interix product on September 17, 1999).[7]

The taskkill command on ReactOS

The ReactOS implementation is based on the Windows variant. It was developed by Andrew Riedi, Andrew Nguyen, and He Yang. It is licensed under the LGPLv2.1 or later.[8]

Examples

[edit]

Find all processes beginning with the letter "p" that were developed by Microsoft and use more than 10 MB of memory and kill them:

PS C:\> ps p* | where { $_.Company -like "Microsoft*" -and $_.WorkingSet -gt 10MB } | kill -confirm

Confirm
Are you sure you want to perform this action?
Performing operation "Stop-Process" on Target "powershell (6832)".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
PS C:\>

Here is a simpler example, which asks the process Explorer.exe to terminate:

PS C:\> taskkill /im explorer.exe

This example forces the process to terminate:

PS C:\> taskkill /f /im explorer.exe

Processes can also be killed by their PID number:

PS C:\> taskkill /pid 3476

Microsoft Singularity

[edit]

Singularity shell, the standard shell for Microsoft Research's microkernel operating system Singularity includes a kill command to terminate background processes.

Examples

[edit]

Stop the process with the name "SampleProcess":

Singularity>kill SampleProcess

Stop the process with the process identifier "42":

Singularity>kill 42

Plan 9 from Bell Labs

[edit]

Under Plan 9 from Bell Labs, the kill program does not actually perform this termination, nor does it take process IDs. Rather, it takes the actual names of processes and outputs the commands for rc, the shell used by Plan 9, to kill the process.[9]

A similar command provided is called slay, which does the same but for processes that refuse to be killed this way.[9]

Examples

[edit]

For example, to kill all instances of troff, one types:

kill troff | rc

Others

[edit]

The kill command has also been ported to the IBM i operating system.[10]

See also

[edit]

References

[edit]
  1. ^ "Bash Reference Manual: Job Control Builtins". The GNU Project. Retrieved 2025-08-06.
  2. ^ "zsh: 17. Shell Builtin Commands". Retrieved 2025-08-06.
  3. ^ "<signal.h>". The Open Group Base Specifications Issue 7. Retrieved 2025-08-06.
  4. ^ Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN 0-9519228-0-7.
  5. ^ "Taskkill". Microsoft TechNet. Retrieved 2025-08-06.
  6. ^ "Resource Kit Utilities - Windows '98 Resource Kit". ActiveXperts Software. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  7. ^ "GNU utilities for Win32". Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  8. ^ reactos/taskkill.c at master · reactos/reactos · GitHub
  9. ^ a b "UNIX to Plan 9 command translation". Plan 9 wiki. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  10. ^ IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). IBM. Retrieved 2025-08-06.

Further reading

[edit]
[edit]
为什么来大姨妈会拉肚子 晨勃是什么意思啊 磁共振检查什么 什么的镜子 九月十五是什么星座的
生菜不能和什么一起吃 今年什么生肖年 梦到头发白了是什么意思 任性的女孩有什么特点 四月天是什么意思
泌乳素偏高是什么原因 红血丝用什么护肤品修复比较好 以备不时之需什么意思 身体发凉是什么原因 艾滋病的症状是什么样
补铁有什么好处 为什么月经老是提前 中央电视台台长什么级别 第一次是什么意思 三伏天吃什么最好
什么填海xjhesheng.com 办狗证需要什么资料hcv8jop7ns5r.cn 胃酸不能吃什么食物hcv7jop4ns7r.cn 肠粘连是什么原因引起hcv8jop4ns3r.cn 10月9号是什么星座hcv7jop5ns3r.cn
周岁和虚岁是什么意思hcv7jop7ns0r.cn 溢水是什么意思hcv9jop6ns0r.cn 胆囊炎要吃什么药hcv9jop4ns7r.cn 抉择是什么意思wmyky.com 血小板太高会导致什么hcv7jop6ns3r.cn
一百岁叫什么之年creativexi.com 石榴什么时候开花hcv9jop1ns6r.cn 1.4什么星座hcv8jop9ns3r.cn 灵芝长什么样hcv7jop5ns2r.cn 豆角炒什么luyiluode.com
口腔溃疡要吃什么药hcv9jop8ns1r.cn 指压板有什么功效hcv9jop0ns5r.cn 手上有痣代表什么hcv9jop0ns6r.cn 11月27是什么星座tiangongnft.com 胸膜炎挂什么科hcv9jop5ns1r.cn
百度