How to exclude some users from Linux Top screen?

Solution 1:

The correct answer is: -U '!root' (or -u '!root' on some Ubuntus). This was introduced in top v3.2.9:

man top for -U option:

Prepending an exclamation point ('!') to the user id or name instructs top to display only processes with users not matching the one provided.

Remember to put the exclamation mark and username in single quotes.

Solution 2:

Also, as of version 3.3, you can just type u while top is running and enter that !root string.


Solution 3:

top -U root shows only processes from root. Unfortunately that is the only option for limiting users according to the man page.

Tags:

Linux

Users

Top