I am trying to list the superusers processes currently running in my Kali distro. Using "pgrep -f sbin" I figured that would do the trick, however it only lists the PID numbers, not the actual name of the processes. How can I get it to do this?

Using "ps ef | grep "sbin" it returns a very unformatted list, is there a neat way to format this or dump it to a textfile with some proper formation?

2 Answers 2


Have you tried adding -u root to the ps command?

This will limit it to just roots processes. i.e. ps -ef -u root | grep sbin.

To control the output you need to look at the OUTPUT FORMAT CONTROL section in the man pages. Just play with the flags until you get the desired/acceptable output?


Solved it by adding the -l flag to pgrep:

pgrep -lf sbin

From man pgrep:

   -l, --list-name
          List the process name as well as the process ID.  (pgrep only.)

You must log in to answer this question.

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