Ameyj
Ameyj

Reputation: 617

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.

Upvotes: 5

Views: 6524

Answers (1)

Yair
Yair

Reputation: 21

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

Upvotes: 2

Related Questions