what is shortcut command to kill process in windows command?
Asked Answered
M

6

23

Problem :

I have a process in windows command which cannot be killed. I tried taskkill and all the shortcuts in this post Linuxlike Ctrl-C (KeyboardInterrupt) for the Windows cmd line?

It refuses to die, even Windows task manager doesn't work to kill the command prompt. This program is resistant.

Misspeak answered 7/7, 2015 at 14:39 Comment(4)
Something is running in command prompt and has control of the output command. I should do this opening another windows?Misspeak
either kill the cmd.exe process in taskmanager, or kill it with taskill. either way, you kill it.Flaherty
Usually if you want to kill all processes associated with a particular console window, the window's close button will work. But if a process has gotten stuck in kernel mode (rare, but it happens sometimes) then there may be no option but a reboot.Audun
Superusers have suggested superuser.com/questions/568906/… and superuser.com/questions/955969/…, neither of which work anymore. Microsoft has changed the behavior yet again.Dolli
M
37

Ctrl + C should stop a program running from the command prompt, similar to linux.

If that doesn't work try to force kill a process from the command prompt, using the following command:

taskkill /F /IM process.exe

/F will force termination of the process, /IM means you're going to provide the running executable that you want to end, thus process.exe is the process to end.

tried using alt + F4?

Misconduct answered 7/7, 2015 at 14:46 Comment(3)
With /F I was able to kill the process. But the original Command Prompt which executed the program won't die. It's still there. Tried Task Manager and ALT + F4 to kill itMisspeak
@Misspeak the cmd is a different program than your target process.Randarandal
The spaces were essential. & Then Ctrl alt delete task manager finally shows the 3 instances of chrome ... which gives me hope I can exit chrome and regain my computer , without switching it off. Gosh opperation could not be completed access denied.Stove
P
5

I was in a similar situation where exit() and Ctrl+Z were the commands used to escape.

Typically entering exit (or logout) will provide you with assisting information, in my case I had the following output:

Use exit() or Ctrl-Z plus Return to exit

Passel answered 1/5, 2018 at 10:51 Comment(1)
I'm pretty sure this is only for Python.Jarnagin
N
0

In Windows:

First try: Ctrl + C If it doesn't work then try pressing q

In MAC OS:

Press Cmd + C or Ctrl + C or q

Numeral answered 6/3, 2021 at 16:46 Comment(0)
C
0

tskill <pid-number> worked for me. I listed all processes using tasklist first, or if you know the name of the process tasklist | findstr <process-name>

Cuyler answered 19/4 at 23:34 Comment(0)
C
0

I have this problem. While running a node terminal as a backend, i need to use ctrl + break. If it's running node as a frontend, it needs q. Idk why but this works for me. I hope this helps.

Cannular answered 7/5 at 6:16 Comment(0)
R
0

regedit

HKEY_USERS.DEFAULT\Control Panel\Desktop

New String Value

AutoEndTasks = 1

https://www.isumsoft.com/windows-10/shutdown-windows-10-without-any-prompts.html

Rhymester answered 13/7 at 15:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.