Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

find effective id euid for process with pid=<some number>

How to find euid of a process if I know its pid I tried I get process id using :

ps -f -u user1

then I tried ps aux , ps -ef with grep pid but can not see euid

I always try to get info from man pages but man ps seems too confusing for a newbie like me.

like image 681
Ameyj Avatar asked Nov 01 '22 15:11

Ameyj


1 Answers

You are looking for the ps option: -o euid

Examples:

  • Display a pid's euid

    ps -eo pid,euid | grep YOUR_PID_HERE

  • Display a pid's euid, ruid and suid

    ps -eo pid,euid,ruid,suid | grep YOUR_PID_HERE

like image 173
Yair Avatar answered Nov 16 '22 12:11

Yair