I need to get a list of background processes in freebsd, but i don't know how. I've tried to use ps command,

ps -ax
ps -e -j

but I haven't found properties which describe background processes. +Tried to use top command, but I've got no result :(

Hmm, I guess that i should see a priority of a process, and if this process has less priority than non-background analogue, so we can conclude that there is a background process.

But that's just a guess...

  • What, precisely, do you mean by "background process"? Do you mean processes that have no controlling terminal? Processes that share a controlling terminal with your process but aren't in the foreground? Or something totally different? – David Schwartz Nov 1 '13 at 8:08
  • Processes that have no controlling terminal :) – Aleksander Korovin Nov 1 '13 at 8:24

The correct command is


If you wish to have more info (not always available), it is

jobs -l

If you wish to bring job number 3 to the foreground,

fg %3

If you have a stopped job, you can resume its execution in the background by means of

bg %3

As for the BSD-style output ps ax, which, BTW, I use too, it is not too informative: it will show your background process in status S (interruptible sleep) if it is waiting for an event (user input?), or R if it is running. But this will not single them out among the bevvy of other processes. You can indeed identify it by combining this info with user ownership and terminal of execution, but I never do it this way because it is too cumbersome.

  • Thank you for reply :) I hope it will help someone else :) – Aleksander Korovin Nov 1 '13 at 8:30

I think this may help. In freeBSD ps -a only shows the user process not all the process so to list all the process

ps -awx -l

This will list all the process you need. I hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.