When I try to exit from my Linux server I get the message:
There are stopped jobs.
: Is there a single command to kill these?
To quickly kill all the jobs running under the bash, enter:
The accepted answer would kill all jobs (which is sufficient in this case) and not merely the stopped ones. Should you want to kill only the Stopped ones, run:
The easiest way is actually to simply immediately retry the exit;
If you want to remove some stopped jobs but not all, try this:
First, list jobs, you will get something like this:
send kill to a stopped job, it will do nothing but queue than bring it in in foreground, it will terminate
Just in case this helps someone else -- most people are here because they have some stopped processes that they started, backgrounded via the shell maybe. I needed to find processes, as root, stopped by other users, for which variants on the
A bit of digging around with
so finally I pipe it to
And then I have a nice list of all the processes from different users that are in the stopped state.
Normally if you got that message, you need to logout twice. E.g. first Ctrl+D gives you the warning message to inform you about stopped jobs, pressing for the second time will log you out killing the jobs. This the same applies to
To kill them manually, try:
If you don't want to kill jobs from your current shell, you can remove them from the table of active jobs without killing by using
Stopped jobs also can be determined by the state of the process (
In case when
To kill them all, you can basically type:
Here is a simple test:
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?