pstree

General

Lists processes in tree structure

Commands

CommandsDescription
pstreeshows process in a tree structure
pstree -pshows pids for all process
pstree [user]shows process of [user]
pstree -ushows users in process tree
pstree -H [pid]highlight treepath matching [pid]
pstree -s [pid]shows parrents of [pid]

Sampes

Show process with owner from tail

$ pstree -u -p 410944
$ tail(410944,username)

Show ps tree with parents from tail

$ pstree -u -p -s 408676
systemd(1)───sh(407034,username)───rxvt(407035)───zsh(407037)───su(408526,username2)───zsh(408541)───tail(408676)