Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# List all running processes (BSD style) ps aux # List processes in forest/tree view ps auxf # List processes for current user ps -u $USER # Find a specific process ps aux | grep nginx pgrep nginx # Returns just the PID(s) pgrep -l nginx # Returns PID and name # Show process tree pstree pstree -p # Include PIDs pstree -u # Include usernames # ---- top ---- top # Keyboard shortcuts inside top: # q quit # M sort by memory # P sort by CPU (default) # k kill process (enter PID) # r renice process # 1 toggle per-CPU display # H show threads # u filter by username # ---- htop (install: sudo apt install htop) ---- htop # F5 = tree view | F6 = sort | F9 = kill | F10 = quit # ---- Process states ---- # R Running # S Sleeping (interruptible) # D Sleeping (uninterruptible, usually I/O wait) # Z Zombie (finished but parent hasn't collected exit status) # T Stopped / traced # Watch a command's resource use in real time watch -n 1 'ps aux --sort=-%cpu | head -15'
Result
Open