I use the
ps command pretty frequently for checking for running processes,
and pretty regularly use
ps axjf to view currently running processes as a
tree. The tree view within
ps, though, has always been especially difficult for
me to read.
Today, though, I stumbled across
pstree, which displays the process tree
much more cleanly. It’s installed by default on Ubuntu, so you can run
pstree -p to show a tree of all processes, with pids, like this:
You can learn more on the pstree man page.