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

Asked

Viewed 307 times

0

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

Does anyone know who the father of the lawsuit is upstart?

For example:

I executed the: ps aux

And I took the PID of the process upstart.

The upstart process has the PID (1430).

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

  • https://superuser.com/q/150117?

1 answer

1

Use ps axf and see in tree form, so it is very easy to find the 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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.