Identification
Users
w: who is logged in, and what they are doingwho: who is logged inwhoami: usernamelast: list of last logged usersid: username, group...groups: list groups/etc/groups: see members for each groupfinger: return a summary of information about a user
Machine
echo $0: language used by the current shelluname -a: info about the kernelhostname: info about the host (ex:website-dev-> role of the user)/proc/version: information about the machine kernel/etc/*release: information about the operating system/etc/issue: an alternative to find the OS/versionps -e/top: see running processes, first column==ownerenv: see environment variableslscpu: list information about the CPU
Permissions
umask: see the default perms on newly created filesfind / -writable -type d 2>/dev/null: find writable directories/etc/passwd: usernames, their groups, their home, and their shell/etc/shadow(root): username, and their hashed password/etc/sudoers(root): sudoers, and rules applied to them, if any
Services
- Apache:
apache2 -v/apache2ctl -M - Sudo:
sudo -V - PostgresSQL:
psql -V - MySQL:
mysql --version - Port and services:
/etc/services - Apps:
dpkg -l
Network
- Ports:
netstat -antp | grep -i list - DHCP (DNS...):
/var/lib/dhcp/dhcpd.leases - DNS:
/etc/resolv.conf,/etc/hosts