1

How do I show running processes for every user? Only the processes. I tried ps -e or ps -A, but it also shows the [ name ] which are threads.

1 Answer 1

2

ps does not show threads-as-such. The processes with names in [square brackets] are part of the kernel. You can deduce that they are processes and not threads because the have a PID. ps simply reads the process table and displays its contents in a readable form. If you don't want to see those kernel processes you can always filter them out:

ps fax | grep -v ' \[[^] ]\+]' | cut -c 1-$COLUMNS

or

ps -ef | grep -v ' \[[^] ]\+]' | cut -c 1-$COLUMNS
2
  • They're kernel threads, actually. Commented Nov 15, 2016 at 23:11
  • True, they corespond to kernel threads.
    – AlexP
    Commented Nov 16, 2016 at 12:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .