What linux command is used to find out who is the parent of a process? [closed]

0

I would like to know which command in the Linux terminal to find out the PID of the parent of a process.

Does anyone know who the parent of the upstart process is?

For example:

I ran the: ps aux

And I got the PID from the upstart process .

The upstart process has the PID (1430) .

How do I find out the parent PID of this process (upstart).

    
asked by anonymous 27.04.2018 / 23:11

1 answer

1

Use ps axf and look in tree form, so it's very easy to find dependent processes.

15732 pts/1    Ss     0:00  \_ bash
26695 pts/1    S+     0:00  |   \_ make watch WATCHMAKE=dev -j64 --keep-going ...
26704 pts/1    S+     0:00  |       \_ bash -c while true; do \ ?make dev -j64 ...
28993 pts/1    S+     0:00  |           \_ inotifywait -qre close_write ...
16239 pts/2    Ss     0:00  \_ bash
16775 pts/2    Sl+    0:33  |   \_ icemon
31755 pts/5    Ss     0:00  \_ bash
31816 pts/5    S      0:00  |   \_ su
31817 pts/5    S      0:00  |       \_ bash
31840 pts/5    S      0:00  |           \_ sudo -u buildbot bash
31841 pts/5    S      0:00  |               \_ bash
32065 pts/5    S+     0:00  |                   \_ tail -f twistd.log
    
28.04.2018 / 21:17