Which of the following commands display the IDs of all processes owned by root? (Choose two.)
A. pgrep -c root
B. pgrep -u root
C. pgrep -f root
D. pgrep -U 0
E. pgrep -c 0
Which of the following commands display the IDs of all processes owned by root? (Choose two.)
A. pgrep -c root
B. pgrep -u root
C. pgrep -f root
D. pgrep -U 0
E. pgrep -c 0
B D
why to many wrong answer?
https://www.man7.org/linux/man-pages/man1/pgrep.1.html
The answer is B and D.
root ID is always 0.