CTRL+C will send a break (stop execution) when no text is selected. Try it ;-)
Reference
Answer from misha256 on Stack ExchangeCTRL+C will send a break (stop execution) when no text is selected. Try it ;-)
Reference
I had the same thing happening with Ctrl+C not stopping the Tracert process. However Ctrl+Pause/Break did.
This was on Windows 10 build 1709 with updates current as of 06-27-2018. I suspect whatever is going on will be machine specific for some odd reason.
What is the shortcut command to kill a process in a Windows command window? - Stack Overflow
unix - What is the proper way to exit a command line program? - Stack Overflow
Am I crazy or does terminal progress sometimes get stuck until you hit enter in Windows cmd/powershell etc..?
How do I quit out of terminal after typing code command?
Videos
Is there anything to force close the window, regardless of whether something is running?
I'm using KDE Neon if that makes a difference, checked in keyboard shortcuts but didn't find anything
Did you try the following key combination: CTRL+C
UPDATE
For Windows 10 (cmd, PowerShell) you can use one of this:
- Right CTRL+C
- CTRL+Pause/Break
First use tasklist to show all running tasks. Then use taskkill /PID 1234 to kill a specific task (PID is the second column) or use taskkill /IM program.exe to kill a specific programm (all instances).
Or just use Ctrl+C to kill current running programm in current cmd window.
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, and /IM means you're going to provide the running executable that you want to end, thus process.exe is the process to end.
Try to use Alt + F4.
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
To close a terminal window you can use the exit command . Alternatively you can use the shortcut ctrl+shift+w to close a terminal tab and ctrl+shift+q to close the entire terminal including all tabs.
You can use the ^D shortcut - that is, hitting Control and d. This works in many shells and shell-like environments. Technically speaking, this key combination emits the end-of-transmission character (ASCII code 04). In gnome-terminal, i.e. bash and other shells, this is interpreted as finishing the interactive session. You can also see this behavior in programs like cat which read from standard input (the keyboard). Try running it without arguments; you can terminate by entering ^D.
Using control-z suspends the process (see the output from stty -a which lists the key stroke under susp). That leaves it running, but in suspended animation (so it is not using any CPU resources). It can be resumed later.
If you want to stop a program permanently, then any of interrupt (often control-c) or quit (often control-\) will stop the process, the latter producing a core dump (unless you've disabled them). You might also use a HUP or TERM signal (or, if really necessary, the KILL signal, but try the other signals first) sent to the process from another terminal; or you could use control-z to suspend the process and then send the death threat from the current terminal, and then bring the (about to die) process back into the foreground (fg).
Note that all key combinations are subject to change via the stty command or equivalents; the defaults may vary from system to system.
If you do Ctrl + Z and then type exit, it will close background applications.
Ctrl + Q is another good way to kill the application.
Ctrl + C
Ctrl + C is a the standard *nix way of signaling a process to abort.
Try Ctrl + C. Also, Ctrl + Z might help if you want to suspend a process.
For further information, man kill.
If you're curious about the difference between suspend and terminate, this answer is a good starting point; the TL;DR version is, a suspended process can be resumed later and its execution can continue. A terminated (and killed) process will be gone.