1 Command reference
Stefan Tanta edited this page 2026-10-08 20:29:19 +02:00

Command reference

Use this as a reminder after completing the chapters. Replace file paths and service names with actual lab values.

Task Command
Current directory pwd
Detailed file listing ls -lah
Create a directory mkdir practice
Move a file mv notes.txt practice/
Read a file cat practice/notes.txt
Search with line numbers, ignoring case grep -in 'word' practice/notes.txt
Current identity id
Username id -un
Addresses ip -br addr
Routes ip route
Neighbor cache ip neigh
Resolver file cat /etc/resolv.conf
DNS lookup dig example.com
Four bounded ping probes ping -c 4 -W 2 example.com
HTTP headers curl -I --connect-timeout 3 --max-time 10 https://example.com
Listening TCP sockets ss -ltn
Listening UDP sockets ss -lun
SSH service state systemctl status ssh --no-pager
Recent nginx journal entries journalctl -u nginx -n 30 --no-pager
Filesystem space df -h
Filesystem inodes df -i
Directory disk usage du -sh ~/interview-practice
Last ten file lines tail practice/notes.txt
Command help man ip

Remember: > truncates, >> appends, and | sends one command's standard output to another command's standard input.

Back to the learning path