Stage 5: Warm‑Up Legend
Consolidate all basics from Module 1 - Linux architecture, commands, shell, and scripting - through practice and interview‑style drills. Build confidence before moving into deeper modules.
Hackbook Overview
- Review: Kernel, shell, file system, and utilities.
- Commands: Navigation (
pwd,ls,cd), file handling (cp,mv,rm), search (grep,find). - Shell Basics: Environment variables, pipes (
|), redirection (>,>>,<). - Scripting: Shebang (
#!/bin/bash), variables, conditionals, loops, arguments. - Integration: Combine commands and scripts to solve small tasks.
Hands‑On Practice
- Write a script that lists all
.logfiles in/var/logand counts them. - Use pipes to filter processes containing “ssh” and redirect results to a file.
- Create a script that checks if a directory exists, and if not, creates it.
- Combine
grep,wc, and redirection to analyze a text file.
Interview Question Bank
Conceptual
- Q1. What are the key components of Linux architecture?
A1. Kernel (manages hardware/resources), Shell (command interpreter), File System (organizes data), Utilities (tools likegrep). - Q2. Why is Linux widely used in servers and cloud environments?
A2. It’s stable, secure, resource‑efficient, and open‑source, making it ideal for scalable infrastructure.
Practical
- Q3. How do you combine commands to list files and count them?
A3.ls | wc -l→ lists files and counts lines. - Q5. How do you redirect both stdout and stderr to a file?
A5.command > output.txt 2>&1.
Q4. Write a script that prints “System Ready” if /etc/passwd exists.
A4.bash
#!/bin/bash
if [ -f /etc/passwd ]; then
echo "System Ready"
fi
Scenario‑Based
- Q6. You’re asked to quickly find the number of running Apache processes.
A6.ps aux | grep apache | wc -l. - Q7. A script fails with “Permission denied.” What’s the fix?
A7. Make it executable:chmod +x script.sh. - Q8. You need to automate a daily backup. How would you approach it?
A8. Write a backup script usingtarand schedule it withcron.
Behavioral Based
- Q9. How do you prepare for Linux interviews?
A9. “I practice commands daily, write small scripts, and simulate interview scenarios to build confidence.” - Q10. Tell me about a time you solved a problem using Linux basics.
A10. Example: “I usedgrepandwcto quickly analyze log files, which helped identify a recurring error.”
Cheatsheet (Quick Notes)
- Combine Commands:
ls | grep pattern | wc -l. - Redirection:
>overwrite,>>append,2>&1redirect errors. - Script Basics:
#!/bin/bash,chmod +x,$1for arguments. - Daily Use:
ps aux,grep,find,tar,cron.

Updated on Dec 21, 2025