# Useful built-in commands for Linux reconnaissance - [[cat|cat /etc/issue]] - [[cat|cat /etc/passwd]] - [[cat|cat /proc/version]] - `env` - `dpkg -l` - list installed packages on Debian derived systems - [[find]] - `getcap` - find and list executable *capabilities* - `history` - `hostname` - `id` - `ifconfig` - `ip route` - `last` - display recently logged-in users (including IP addresses for network users) - `ls` - `lsof -i` - list programs using given network ports (use with [[netstat]]) - [[netstat|netstat -ano]] - list all listening parts and established connections, no domain resolution - [[netstat|netstat -i]] - list per interface statistics - [[netstat|netstat -l]] - list *only* listening ports - [[netstat|netstat -p]] - list protocol and service information (requires root to see everything) - [[netstat|netstat -s]] - list protocol statistics - [[ps|ps auxfww]] - show process tree - [[ps|ps auxww]] - show lots and lots of process info - `rpm -qa` - list installed packages on Red Hat derived systems - [[sudo|sudo -l]] - `uname -a` - `w` - list all currently logged-in users and their current program - `who` - list all currently logged-in users (including IP addresses for network users)