hostname |
Displays the system’s hostname. This may sometimes indicate the system’s role in a network (for example, a database server or production machine), although hostnames can be changed and are not always reliable identifiers. |
uname -a |
Shows detailed system information, including kernel version and architecture. This information is useful when identifying compatibility issues or researching known kernel vulnerabilities. |
cat /proc/version |
Displays kernel version information along with compiler details. Helps confirm system build information and whether development tools such as GCC are installed. |
cat /etc/issue |
Displays operating system identification text. This file can be customized, so it should be verified against other system indicators. |
ps |
Shows processes running in the current terminal session. Columns include process ID (PID), terminal type (TTY), CPU time used (TIME), and the command name (CMD). |
ps -A |
Displays all running processes on the system. |
ps axjf |
Displays processes in a tree format, showing parent and child relationships between processes. |
ps aux |
Displays processes for all users, including background services. Shows the user who started each process and resource usage. Useful for system analysis and troubleshooting. |
env |
Displays environment variables. The PATH variable may reveal available tools such as scripting languages or compilers. |
sudo -l |
Lists which commands the current user is allowed to run with elevated privileges. Useful for understanding permission boundaries. |
ls |
Lists files and directories in the current location. |
ls -la |
Displays hidden files, permissions, ownership, and timestamps. Useful when reviewing file access and permissions. |
id |
Displays the current user’s ID, group memberships, and privilege level. |
id username |
Displays identity and group information for a specific user. |
cat /etc/passwd |
Displays all system users. Some entries represent system or service accounts. |
grep home /etc/passwd |
Filters likely real user accounts by searching for home directories. |
history |
Displays previously executed commands. May provide insight into system usage patterns. |
ifconfig |
Displays network interfaces and assigned IP addresses. Helps identify network connectivity and available interfaces. |
ip route |
Displays the routing table to show reachable networks and gateways. |
netstat -a |
Displays all active connections and listening ports. |
netstat -at |
Displays only TCP connections. |
netstat -au |
Displays only UDP connections. |
netstat -l |
Displays ports currently listening for connections. |
netstat -s |
Displays network statistics by protocol. |
netstat -tp |
Displays active connections with associated service names and process IDs. |
netstat -i |
Displays network interface statistics and activity levels. |
find . -name filename |
Searches for a file by name in the current directory. |
find /home -name filename |
Searches for a file by name in the /home directory. |
find / -type d -name dirname |
Searches for a directory by name. |
find / -type f -perm 0777 |
Finds files that are readable, writable, and executable by all users. |
find / -perm a=x |
Finds executable files. |
find / -user username |
Finds files owned by a specific user. |
find / -mtime 10 |
Finds files modified within the last 10 days. |
find / -size 50M |
Finds files of a specific size. Supports + or – for larger or smaller files. |
find / -writable -type d 2>/dev/null |
Finds directories that are writable by any user. Suppresses error messages. |
find / -perm -o x -type d 2>/dev/null |
Finds directories that are executable by any user. |
find / -name perl* |
Searches for Perl installations or scripts. |
find / -name python* |
Searches for Python installations or scripts. |
find / -name gcc* |
Searches for GCC compiler tools. |
find / -perm -u=s -type f 2>/dev/null |
Finds files with the SUID permission bit, which allows execution with the file owner’s privileges. |