I need to find all running processes whose owner is neither root nor Student. I know how to not get running processes whose owner is neither root nor Student by type
ps aux | egrep '^[^(root)|(Student)]'
I am struggling with get all running processes that aren't Student or root. Right now, I only get some running processes by typing
ps aux | egrep '^[^(root)|(Student)]'
I tried [a-z]+
and it shows root and other running processes. How to get all running process without root and Student using egrep
?