Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
not sure i understand what you are asking, but i typically will run ps ax | grep (application name i am looking for) if nothing comes up, then i just run ps ax and scroll up looking for the PID, then i will try first kill -9 PID as that is supposed to kill the program + all other applications/programs that are running along with that PID.
Another command to kill a process is top. First search for the PID, then enter the letter k, You will get a PID to kill prompt. Enter the PID and press enter.
Yet another way is pkill. With pkill you enter the application name.
my question is if the parent id is 1, can we still kill?
Yes, you can kill a process even if it's parent is "1" to kill a process, you must either own it or be the root user (i.e. sudo). There are a number of processes that show up with the name in brackets like:
You can find that the answer to this question is so simple when you notice that, technically, ALL the processes are sons of init (which pid is always 1).
You can easily check that graphically with pstree.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.