UnixDroid

Linux · 3 Nov 2026 · 1 min read

25 Linux Commands Every Ethical Hacker Should Know

From grep to ss — the commands you'll use daily, with real examples.

Why the terminal matters

GUIs hide what is really happening. The terminal lets you search logs, chain tools together and automate repetitive work.

Searching an auth log for failed SSH logins with grep
Searching an auth log for failed SSH logins with grep

Searching and filtering

Commands like grep, find, awk and sort turn huge log files into answers in seconds.

grep "Failed password" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -nr

That one line shows which IP addresses tried to brute-force SSH — and how many times.

Networking

  • ip a — your interfaces and IP addresses
  • ss -tulpn — which ports are listening, and which program owns them
  • curl -I https://example.com — read HTTP response headers

Tip: try every command in this post on your own machine. Reading is not the same as typing.