Linux list processes by user names (EUID and RUID)

To list all the processes running on a Linux system by their effective and real user IDs (EUID and RUID), you can use the ps command with the following options:

ps -e -o user=EUID,ruid=RUID,pid,cmd

Here’s what each option does:

  • -e: Show processes from all users.
  • -o user=EUID,ruid=RUID: Specify the output format to include the effective and real user IDs.
  • pid,cmd: Display the process ID and command name for each process.

The resulting output will be a list of all the processes running on the system, along with their effective and real user IDs, process IDs, and command names. This information can be useful for identifying processes owned by specific users, and for understanding the relationship between EUID and RUID.

Leave a Comment