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
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
-
They're kernel threads, actually.Gilles 'SO- stop being evil'– Gilles 'SO- stop being evil'2016-11-15 23:11:50 +00:00Commented Nov 15, 2016 at 23:11
-
True, they corespond to kernel threads.AlexP– AlexP2016-11-16 12:08:06 +00:00Commented Nov 16, 2016 at 12:08