Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion basic-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,13 @@ Essential commands used daily by DevOps and Cloud Engineers for secure remote se
| :--- | :--- | :--- |
| `sudo apt update && sudo apt upgrade -y` | Update package lists and upgrade all installed packages | Patching server vulnerabilities right after launching an instance. |
| `sudo apt install -y docker.io` | Install a package automatically without confirmation prompts | Used inside CI/CD provisioning scripts for silent automation. |
| `sudo apt autoremove -y` | Remove unused packages and leftover dependencies | Cleaning up disk space on staging or production servers. |
| `sudo apt autoremove -y` | Remove unused packages and leftover dependencies | Cleaning up disk space on staging or production servers. |

## 🔎 8. Log Inspection & Troubleshooting

| Command | Description | DevOps Real-Life Use Case |
| :--- | :--- | :--- |
| `journalctl -u docker.service -n 50` | View the last 50 log lines of a specific systemd service | Debugging container runtime errors when Docker crashes. |
| `journalctl -xe` | Show system logs trailing with extension details on failure | Finding root causes when `systemctl start` fails. |
| `tail -f /var/log/nginx/access.log` | Stream and monitor log files in real-time | Tracking live user traffic or identifying active DDOS attacks. |
| `grep -ri "fatal" /var/log/` | Search for a specific string inside all files recursively | Scanning heavy log directories for hidden application errors. |
Loading