LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do I stop a running program? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-stop-a-running-program-945763/)

spkemp 05-18-2012 12:35 PM

how do I stop a running program?
 
I know I can CTL-Z it and then kill the process.
I am asking how to STOP a program in execution.
I know there is a very simple answer but I just cannot recall how to it.

TIA
-steve

273 05-18-2012 12:40 PM

CTRL-c ?

pan64 05-18-2012 12:42 PM

I do not think you know it, you already wrote it: if you need to kill the process then: the command to kill a process is named kill. See man page. Ctrl-Z will not kill the program, it will stop it. It means the execution is suspended, but can be continued later.

spkemp 05-18-2012 04:20 PM

Thanks!
 
Quote:

Originally Posted by 273 (Post 4682025)
CTRL-c ?

Bingo.

Simple does not mean EASY: Try looking this up in the documentation....

Thanks again -- what would we do without the Brits?!

amboxer21 05-19-2012 01:34 AM

If you know the name of the running process, try; pidof "process". Then, if it returns a pid, you can kill it with kill -9 "pid" or killall "proc name". If pidof return nothing, then either the process is not running or you miss spelled the process name. Use
Code:

ps axf -eo pid,ppid,sid,uid,args
To see all running processes.


All times are GMT -5. The time now is 07:01 PM.