Module 2 Summary — Linux Command Line Essentials¶
Congratulations! 🎉 You have completed Module 2: Linux Command Line Essentials. In this module, you learned how to interact with Linux using the command line—the most powerful interface for Linux Administration, Cloud Engineering, DevOps, Platform Engineering, and Cybersecurity.
Module Overview¶
The Linux Command Line is the primary interface used by professionals to manage systems, automate tasks, troubleshoot issues, and deploy applications.
By completing this module, you've built the skills needed to confidently navigate Linux systems and execute commands efficiently.
Lessons Covered¶
| Lesson | Topic |
|---|---|
| Lesson 1 | Understanding the Shell |
| Lesson 2 | Bash Basics |
| Lesson 3 | Navigating the Filesystem |
| Lesson 4 | File and Directory Commands |
| Lesson 5 | Viewing File Contents |
| Lesson 6 | Searching Files and Directories |
| Lesson 7 | Wildcards and Globbing |
| Lesson 8 | Command History |
| Lesson 9 | Input, Output & Redirection |
| Lesson 10 | Pipes |
What You Learned¶
By completing this module, you can now:
- Understand how the Linux Shell works
- Use Bash efficiently
- Navigate the Linux filesystem
- Create, copy, move, rename, and delete files
- View and inspect files
- Search files using powerful Linux commands
- Use wildcards to work with multiple files
- Reuse commands using Bash history
- Redirect input, output, and errors
- Build powerful Linux command pipelines
Command Categories¶
Shell Commands¶
Navigation Commands¶
File Management¶
Viewing Files¶
Search Commands¶
Wildcards¶
Redirection¶
Pipes¶
Command Reference¶
| Command | Purpose |
|---|---|
| pwd | Show current directory |
| ls | List files |
| cd | Change directory |
| mkdir | Create directory |
| touch | Create file |
| cp | Copy files |
| mv | Move/Rename |
| rm | Delete files |
| cat | Display file |
| less | Read large files |
| head | First lines |
| tail | Last lines |
| find | Search files |
| locate | Fast file search |
| history | Command history |
| grep | Search text |
| wc | Count lines/words |
| tee | Display and save output |
Linux Command Flow¶
Pipe Workflow¶
Example:
Redirection Flow¶
Example:
Error:
Practical Assessment¶
Complete the following tasks without referring to previous lessons.
Task 1¶
Create the following structure.
Task 2¶
Create files.
Task 3¶
Copy:
to
Task 4¶
Rename:
to
Task 5¶
Display:
- Current directory
- Hidden files
- Detailed listing
Task 6¶
Search:
- YAML files
- Shell scripts
- Log files
Task 7¶
Display:
- First three lines
- Last two lines
of README.md.
Task 8¶
Redirect output.
Append current date.
Task 9¶
Count files.
Task 10¶
Display only shell scripts.
Mini Project¶
Build a Project Workspace¶
Create the following structure.
linux-project
├── app
│ ├── app.py
│ ├── requirements.txt
│ └── Dockerfile
├── configs
│ ├── nginx.conf
│ └── app.yaml
├── scripts
│ ├── deploy.sh
│ └── backup.sh
├── logs
└── backup
Requirements:
- Create directories
- Create files
- Copy configs
- Rename files
- Search files
- Display file contents
- Use pipes
- Use redirection
Production Scenarios¶
Scenario 1¶
A production server has over 20,000 log files.
Find:
- Today's logs
- Files larger than 500 MB
Scenario 2¶
Your application has crashed.
Tasks:
- Find configuration files.
- View logs.
- Count ERROR entries.
- Save output.
Scenario 3¶
Find:
- Running Docker containers.
- Running Kubernetes Pods.
- SSH processes.
Scenario 4¶
An administrator accidentally deleted a configuration file.
Restore from backup and verify.
Scenario 5¶
Find every shell script inside:
and make a backup.
Command Challenge¶
Without using the mouse:
Complete the following.
- Navigate directories
- Create files
- Rename files
- Copy directories
- Delete files
- Search files
- Display file contents
- Redirect output
- Build pipelines
Time limit:
15 Minutes
Knowledge Check¶
Beginner¶
- What is Bash?
- What is the Shell?
- Difference between Shell and Terminal?
- What does
pwddo? - What does
cddo? - What does
ls -ladisplay? - Which command creates a file?
- Which command copies files?
- Which command deletes files?
- What is a pipe?
Intermediate¶
- Explain PATH.
- Difference between
>and>>. - Explain
tail -f. - Difference between
findandlocate. - Explain wildcard expansion.
- Difference between absolute and relative paths.
- Explain
tee. - Explain command history.
- Difference between stdout and stderr.
- Explain pipelines.
Architect Level¶
- Why is Bash still widely used?
- Why should administrators master pipelines?
- Explain Linux command execution.
- How would you troubleshoot an application using only the command line?
- How do command-line skills improve DevOps automation?
Multiple Choice Quiz¶
1. Which command shows the current directory?¶
A. ls
B. pwd
C. cd
D. cat
2. Which command creates an empty file?¶
A. mkdir
B. touch
C. cp
D. mv
3. Which wildcard matches any number of characters?¶
A. ?
B. *
C. []
D. {}
4. Which command searches the filesystem?¶
A. grep
B. find
C. cat
D. pwd
5. Which symbol appends output?¶
A. >
B. >>
C. <
D. |
6. Which command monitors a growing log file?¶
A. cat
B. head
C. tail -f
D. less
7. Which command displays previous commands?¶
A. ps
B. history
C. grep
D. alias
8. Which command counts lines?¶
A. head
B. wc
C. cat
D. nl
9. Which command identifies the location of an executable?¶
A. whereis
B. locate
C. which
D. find
10. What does a pipe (|) do?¶
A. Deletes files
B. Copies files
C. Sends output from one command to another
D. Creates directories
Quiz Answers¶
| Question | Answer |
|---|---|
| 1 | B |
| 2 | B |
| 3 | B |
| 4 | B |
| 5 | B |
| 6 | C |
| 7 | B |
| 8 | B |
| 9 | C |
| 10 | C |
Best Practices¶
- Learn keyboard shortcuts.
- Use Tab Completion frequently.
- Use
lessinstead ofcatfor large files. - Preview wildcard matches before deleting files.
- Use pipes instead of temporary files.
- Redirect logs for troubleshooting.
- Practice command-line navigation daily.
Common Mistakes¶
❌ Using rm -rf without verification.
✅ Avoid using rm -rf without verification when a safer approach exists.
❌ Overwriting important files using >.
✅ Avoid this mistake: overwriting important files using >.
❌ Searching the entire filesystem unnecessarily.
✅ Narrow the search instead of the entire filesystem unnecessarily.
❌ Ignoring error output.
✅ Always review error output.
❌ Re-typing long commands instead of using history.
✅ Prefer using history rather than re-typing long commands.
Module Cheat Sheet¶
Navigation¶
Files¶
Viewing¶
Search¶
Wildcards¶
Redirection¶
Pipes¶
Production Readiness Checklist¶
Before moving to Module 3, ensure you can confidently:
- Navigate the Linux filesystem without assistance.
- Create, copy, move, and delete files safely.
- View and analyze large log files.
- Search for files using different criteria.
- Use wildcards to manage multiple files.
- Reuse commands with Bash history.
- Redirect input, output, and errors.
- Build multi-stage command pipelines.
If you can complete these tasks comfortably, you're ready for the next module.
What's Next?¶
Congratulations!
You have completed Module 2 – Linux Command Line Essentials.
Next, you'll begin Module 3 – Text Processing, where you'll learn to transform logs and configs with classic Unix filters.
Topics include:
cat(quick review)grep,cut,sort,uniq,tr, andwcpaste,join,split,fmt,column, andstringsteeandxargssedandawk- Regular Expressions
- Real-world log analysis and DevOps workflows
Downloadable Resources (Coming Soon)¶
- Linux Command Line Cheat Sheet (PDF)
- Bash Command Reference
- Mind Maps
- Hands-on Lab Workbook
- Interview Preparation Guide
- Practice Exercises
"The Linux command line isn't just a tool—it's the language of automation, infrastructure, and modern engineering."
— REBASH Academy