These Linux questions come up again and again for sysadmin, DevOps, cloud and SOC roles. Read the answer, then run the commands yourself in the free online Linux terminal so they stick. For the full picture, the free Learn Linux course covers every topic below with a hands-on lab.
Files and permissions
What does chmod 755 mean? Owner read/write/execute (7); group and others read/execute (5). Common for scripts and directories. See permissions as numbers or the chmod calculator.
How do you find files? find /path -name "*.log", or by size with
-size +1M.
Processes
How do you see running processes? ps aux, top, or
pgrep name. How do you stop one? kill PID, or
kill -9 PID to force it.
What is the difference between a process and a job? A job is a process started
from your shell that you can background (&), suspend (Ctrl+Z) and resume
(bg/fg).
Text and logs
How do you search a log? grep "error" file; count with
grep -c. Pull a column? awk '{print $1}'.
Find and replace? sed 's/old/new/g' file.
Networking
How do you see listening ports? ss -tln (or netstat
-tln). Check connectivity? ping, curl -I,
dig.
Scripting
What is a shebang? The first line #!/bin/bash that tells the
system which interpreter runs the script. How do you make a script executable?
chmod +x script.sh.
Know these cold by doing them, not just reading - open the terminal and try each command.