Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

pstree cheatsheet

📅 2017-Nov-21 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

The ps command in Linux has been horribly mauled by having to support Unix, BSD and GNU options and innumerable eccentric back-compatible necessities that I find it almost unusable. Instead, I like to use the pstree command for almost all my process exploration tasks. pstree shows the processes on a system as a tree.

$ sudo apt install psmisc
$ pstree
$ pstree joe
$ pstree -a
$ pstree -p
$ pstree 900
$ pstree -s 900

Tried with: pstree 22.21 and Ubuntu 16.04