Linux list processes by user names (EUID and RUID)

https://w‮al.ww‬utturi.com
Linux list processes by user names (EUID and RUID)

To list processes by user names (EUID and RUID) in Linux, you can use the ps command. This command allows you to display information about processes running on the system.

To list processes by user names, you can use the following syntax:

$ ps -eo user,euid,ruid

This will display a list of all processes, along with the user name, effective user ID (EUID), and real user ID (RUID) for each process.

The EUID is the user ID that the process is running as, while the RUID is the user ID that the process was started as.

You can also use the -u option with the ps command to display only processes owned by a specific user.

For example, to list processes owned by the user john, you can use the following command:

$ ps -u john -eo user,euid,ruid

This will display a list of all processes owned by the user john, along with the user name, effective user ID (EUID), and real user ID (RUID) for each process.

You can also use the top command to list processes by user names. This command displays information about the processes running on the system, including the user names and IDs.

To display the user names and IDs for processes using the top command, you can press the u key while the top command is running. This will toggle the display of the user names and IDs for processes.

You can also use the -u option with the top command to display only processes owned by a specific user.

For example, to list processes owned by the user john using the top command, you can use the following command:

$ top -u john

This will display a list of processes owned by the user john, along with their user names and IDs.

Finally, you can use the pgrep command to list processes by user names. This command searches for processes based on various criteria, such as the process name, user ID, and group ID.

To list processes by user names using the pgrep command, you can use the following syntax:

$ pgrep -u <username>

For example, to list processes owned by the user john using the pgrep command, you can use the following command:

$ pgrep -u john

This will display a list of processes owned by the user john, along with their process IDs.

Created Time:2017-10-30 10:17:41  Author:lautturi