Get the parent PID of a process

ps

ps -o ppid= -p {{pid}}

click the source code to copy install ps on any operating system with command-not-found.com