How do you stop a running process?

Answer Posted / c sivakumar

If we want to kill a process first we have to know the
process id. We cam come to know ps or top command.
Then we have to identify the respective proce's child
process with the help of ptree command. Then we can give
kill id-1 id-2

example:- Take an example while using ps command

# ps
PID TT S TIME COMMAND
2243 pts/16 S 0:00 -csh

now we identified the PID no (2243) with the help of above
said ps command.

Then we have to give following command to know child
process_-

ptree 2243

1498 /usr/local/sbin/sshd
2062 /usr/local/sbin/sshd
2199 /usr/local/sbin/sshd
2205 -csh
2243 -csh
11535 ptree 2243

Now we can kill above said all ids.

kill 1498 2062 2199 2205 2243 11535

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are you in or at the office?

615


Which command is used to kill the last background job?

787


How do I use grep to find a file?

583


What do chgrp command do?

596


How do I run a bash script?

588






What does this command do,"$more readme.txt“?

693


How does the system know where one command ends and another begins?

1583


Differentiate cmp command from diff command.

592


Which unix command to make a new directory?

595


What is a bash command?

627


What is unix command line?

614


Explain command to display different lines that are found when compare two files?

679


What is the command to find hidden files in the current directory?

589


Which command is used to copy files?

562


What is grep in bash?

591