LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2012, 12:35 PM   #1
spkemp
LQ Newbie
 
Registered: May 2012
Location: US 97103
Distribution: Ubuntu, for lack of any current knowledge of my choices.....
Posts: 4

Rep: Reputation: Disabled
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
 
Old 05-18-2012, 12:40 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,660

Rep: Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911
CTRL-c ?
 
1 members found this post helpful.
Old 05-18-2012, 12:42 PM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,349

Rep: Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747
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.
 
Old 05-18-2012, 04:20 PM   #4
spkemp
LQ Newbie
 
Registered: May 2012
Location: US 97103
Distribution: Ubuntu, for lack of any current knowledge of my choices.....
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks!

Quote:
Originally Posted by 273 View Post
CTRL-c ?
Bingo.

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

Thanks again -- what would we do without the Brits?!
 
Old 05-19-2012, 01:34 AM   #5
amboxer21
Member
 
Registered: Mar 2012
Location: New Jersey
Distribution: Gentoo
Posts: 291

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script to start a program either not running or kill if running avataratar Linux - Newbie 1 03-29-2012 02:45 AM
how to stop execution of a program if it is already running? kkpal Linux - Newbie 8 07-23-2008 12:52 PM
Running program from terminal with & does nothing, program stops DittoAlex Linux - General 1 10-05-2007 01:35 AM
Stop java program(threaded program..should end cleanly) rmanocha Programming 4 11-09-2004 09:36 AM
Program on boot-up won't stop running in a continuous loop... CanadianSlacker Slackware 6 01-14-2004 01:06 AM


All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration