Linux 查詢 sudo PID 的 UID

Linux 要查詢某個 Process ID (PID) 的 User (UID) 是誰?

ps aux | grep $pid、/proc/$PID/status,都會拿到 root 或 sudo 的 id,要怎麼找到是哪個使用者執行的呢?

  • 註:想要找到此 Process 是誰執行的,看到 sudo、root 都沒救,需要找到最原始的執行者

閱讀全文〈Linux 查詢 sudo PID 的 UID〉