Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux command to stop a process

Posted on 2016-08-01
8
Medium Priority
?
115 Views
Last Modified: 2016-08-02
I had this question after viewing Unix / Linux grid computing.
0
Comment
Question by:taaz
  • 4
  • 3
8 Comments
 
LVL 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 1000 total points
ID: 41737483
What is the question?

To stop a process, you use the kill command. Give the process ID as parameter.
0
 
LVL 14

Assisted Solution

by:Alexander Eßer [Alex140181]
Alexander Eßer [Alex140181] earned 1000 total points
ID: 41737526
Yes, use kill (or kill -9) aka SIGTERM or SIGKILL

Just to add:

https://major.io/2010/03/18/sigterm-vs-sigkill/
0
 

Author Comment

by:taaz
ID: 41737570
So we can not stop the process and then restart ?
The only option we have is to kill the process?

How we can start the same process if we kill it?
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:taaz
ID: 41737630
The thing is I want to temporary stop the process and then restart
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41737664
What process is this? You want to pause a process, not stop a process right?
0
 

Author Comment

by:taaz
ID: 41737707
Right
To pause and then start
0
 
LVL 38

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 1000 total points
ID: 41737917
To do that you can try SIGSTOP and SIGCONT signals:

SIGCONT - To make processes continue executing after being paused by the SIGTSTP or SIGSTOP signal, send the SIGCONT signal to the paused process. This is the CONTinue SIGnal. This signal is beneficial to Unix job control (executing background tasks).

So:

kill -SIGSTOP <process ID>

and:

kill - SIGCONT <process ID>
0
 

Author Closing Comment

by:taaz
ID: 41739254
Thank you!!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month7 days, 17 hours left to enroll

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question