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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What is the difference between killing and ending a process?
Which is advised?
Lets say I ran p0f. After say 1 hour, I want it to stop running cos I already have the necessary data that I want. I know that p0f will appear in the system monitro under bash->shell->p0f. By right clicking, I can kill it because I know that it is p0f.
But, how can I kill this process using the shell prompt?
I have read the man but still unsure. I have tried some parameters and all but to no avail.
Similarly, you can run: top which lists the processes that are consuming the most resources. Either way, the kill command will stop it (you may need to be root to kill it) -- J.W.
Another option to kill prosseses from the command line is killall. It operates in a simalar way to kill, though it also allows you to use the name of the prosses instead of merely the PID. For example, you want to kill httpd (apache), you would type:
killall httpd
it can also be used to send other signals, such as the HUP (hangup) signal through killall -HUP, that often restarts programs that function as servers, or killall -9, which tells the program to die imedately.
First I ran p0f at prompt, OK.
THen I stopped it, using ctrl-C.
I want to kill this process by its name and not its PID.
Using ps aux I see p0f is still running even though I had stopped it
I tried using killall p0f and killall -15 p0f but still when I run ps aux, it is still there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.