How do I get the parent process ID of a given child processHow do I get the parent process ID of a given child process How do I get the parent process ID of a given child process | Anglehit
How do I get the parent process ID of a given child process

How do I get the parent process ID of a given child process

How do I get the parent process ID of a given child process in Linux.

Use ps -o ppid=   e.g. ps -o ppid= 2076 returns 2054, which you can easily use in a script etc. ps -o ppid=…

6 years ago