Skip to content
Open
59 changes: 59 additions & 0 deletions 2026/day-01/learning-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Learning Plan

---

**What is your understanding of DevOps & Cloud Engineering?**

**A:-** DevOps is a methodology that combines cultural philosophies, practices & tools.
→ It's a combination of Development & Operations.

---

**Why you are starting learning DevOps & cloud?**

**A:-**
- To get the first job.
- To start my career, make my career.

---

**Where do you want to reach?**

**A:-** DevOps Engineer Level.

---

**How you will stay consistent every single day?**

**A:-**
- After Fajr: **2 hours/1** on weekdays
- **4 to 6 hours** on weekends.

---

**Current Level:** Student.

---

### 3 Clear Goals:

1. Containerize a project.
2. Automate testing & deployment.
3. Deploy to a cloud (AWS / Azure).

---

### 3-Core-DevOps Skills:

1. Linux administration & Bash scripting.
2. Containerization (Docker).
3. CI/CD pipelines (or) Kubernetes.

---

### Weekly Time Budget

- **Weekdays:** 1.5 to 2 hours
- **Weekends:** 3 – 6 hours

> *(Incl's: making of notes, understanding concepts by watching lectures – Doing practice & Building stuff)*
22 changes: 22 additions & 0 deletions 2026/day-02/linux-architecture-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Day 02 – Linux Architecture, Processes, and systemd

## Core Components of Linux
* **Kernel:** It’s an intermediary between the hardware and the software which manages the hardware resources for the software.
* **User Space:** It’s a layer where all the applications and the users exist. The users cannot directly access the hardware from here.
* **Init / systemd:** (Stands for "system daemon"). When the Linux system boots up, it first loads the kernel. The kernel then starts this very first process to manage everything else. It is always assigned **PID 1**.

## Processes
A **process** is any program that is currently in execution. Every running process is assigned a unique identifier called a **PID** (Process ID).

### Types of Process States:
* **Running:** The process is active and executing.
* **Sleeping:** The process is currently waiting for something to happen.
* **Stopped:** The process is stopped or suspended.
* **Zombie:** The process has finished executing and is dead, but it still has a record in the system.

## 5 Daily Commands (Processes & systemd)
* `top`: Shows a live dashboard of running processes.
* `ps`: Takes a snapshot of active processes.
* `kill`: Stops a process using its PID.
* `systemctl`: Manages systemd background services.
* `journalctl`: Views system logs for debugging.
36 changes: 36 additions & 0 deletions 2026/day-03/linux-commands-cheatsheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Day 03 – Linux Commands Cheatsheet

## 📁 File System & Navigation
* `pwd` - Prints the absolute path of the current working directory.
* `cd` - Changes the current directory.
* `cd ..` - Moves you up one directory level.
* `ls` - Lists files and folders in the current directory.
* `ls -l` - Lists files with detailed information (permissions, size, owner, timestamp).
* `ls -a` - Lists all files in a directory, including hidden ones (files starting with a dot).
* `mkdir` - Creates a new directory (folder).
* `touch` - Creates a new empty file or updates the timestamp of an existing one.
* `vim` - Opens the Vim command-line text editor to view or edit files.
* `cat` - Displays the entire contents of a file directly in the terminal.
* `echo` - Prints text or variables to the terminal screen.
* `>` - Redirects command output into a file (overwriting the file's current contents).

## ⚙️ Process & System Management
* `top` - Displays a live, constantly updating dashboard of running processes and system resources.
* `systemctl` - Manages systemd background services (start, stop, restart, enable).
* `free -h` - Shows available and used system memory (RAM) in a human-readable format.
* `df -h` - Displays the available and used disk space on your file systems.
* `uptime` - Shows how long the system has been running without a reboot.
* `sudo` - Allows you to execute commands with administrative (root) privileges.
* `sudo apt-get update` - Refreshes the local list of available package updates from the repositories.
* `sudo apt-get upgrade` - Installs the newest versions of all packages currently installed on the system.

## 🌐 Networking Troubleshooting
* `ping` - Tests network connectivity to a specific IP address or domain name.
* `dig` - Queries DNS servers to find information about domain names (like resolving a domain to an IP).
* `ip addr` - Displays your machine's active network interfaces and their assigned IP addresses.

## 🛠️ General Utilities
* `clear` - Clears the terminal screen for a cleaner workspace.
* `whoami` - Displays the username of the currently logged-in user.
* `date` - Shows the current system date and time.
* `man` - Opens the official manual page for any given command (e.g., `man ls`).
110 changes: 110 additions & 0 deletions 2026/day-04/linux-practice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Day 04 - Linux Practice: Processes and Services

**Target Service Inspected:** `cron` (Task Scheduler)

## Process Checks
Checking for active processes running on my local WSL environment.

**1. Command:** `ps aux | grep cron`
```text
root 151 0.0 0.0 4464 2816 ? Ss 05:35 0:00 /usr/sbin/cron -f -P
huzefa 2147 0.0 0.0 4120 2304 pts/0 S+ 06:41 0:00 grep --color=auto cron
```
**2. Command:** `top -n 1 -b | head -n 15`
```text
top - 06:41:23 up 1:05, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 24 total, 1 running, 23 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni, 98.8 id, 0.6 wa, 0.0 hi, 0.6 si, 0.0 st
MiB Mem : 7776.2 total, 7205.6 free, 521.6 used, 204.9 buff/cache
MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 7254.6 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 24148 14464 10880 S 0.0 0.2 0:01.38 systemd
2 root 20 0 3072 1664 1664 S 0.0 0.0 0:00.01 init-sy+
10 root 20 0 3072 1792 1792 S 0.0 0.0 0:00.00 init
53 root 19 -1 50396 15744 14720 S 0.0 0.2 0:00.40 systemd+
92 systemd+ 20 0 22400 13952 11520 S 0.0 0.2 0:00.14 systemd+
101 root 20 0 35324 11648 8832 S 0.0 0.1 0:01.29 systemd+
151 root 20 0 4464 2816 2688 S 0.0 0.0 0:00.02 cron
157 message+ 20 0 8796 4864 4480 S 0.0 0.1 0:00.12 dbus-da+
```
**1. Command:** `systemctl status cron`
```text
● cron.service - Regular background program processing daemon
Loaded: loaded (/usr/lib/systemd/system/cron.service; enabled; preset: enabled)
Active: active (running) since Fri 2026-07-31 05:11:51 UTC; 1h 29min ago
Invocation: 439aa67cae1f495399add4c0b4c264f4
Docs: man:cron(8)
Main PID: 151 (cron)
Tasks: 1 (limit: 9319)
Memory: 508K (peak: 4.5M)
CPU: 158ms
CGroup: /system.slice/cron.service
└─151 /usr/sbin/cron -f -P

Jul 31 05:11:51 huzefa cron[151]: (CRON) INFO (Running @reboot jobs)
Jul 31 05:17:01 huzefa CRON[564]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 05:17:01 huzefa CRON[566]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 31 05:17:01 huzefa CRON[564]: pam_unix(cron:session): session closed for user root
Jul 31 06:17:01 huzefa CRON[795]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 06:17:01 huzefa CRON[797]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 31 06:17:01 huzefa CRON[795]: pam_unix(cron:session): session closed for user root
Jul 31 06:25:01 huzefa CRON[811]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 06:25:01 huzefa CRON[813]: (root) CMD (test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily>
Jul 31 06:25:01 huzefa CRON[811]: pam_unix(cron:session): session closed for user root
```
**2. Command:** `systemctl list-units --type=service --state=running`
```text
UNIT LOAD ACTIVE SUB DESCRIPTION
console-getty.service loaded active running Console Getty
cron.service loaded active running Regular background program processing daemon
dbus.service loaded active running D-Bus System Message Bus
getty@tty1.service loaded active running Getty on tty1
polkit.service loaded active running Authorization Manager
rsyslog.service loaded active running System Logging Service
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running User Login Management
systemd-resolved.service loaded active running Network Name Resolution
systemd-udevd.service loaded active running Rule-based Manager for Device Events and Files
unattended-upgrades.service loaded active running Unattended Upgrades Shutdown
user@1000.service loaded active running User Manager for UID 1000
wsl-pro.service loaded active running Bridge to Ubuntu Pro agent on Windows

Legend: LOAD → Reflects whether the unit definition was properly loaded.
ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
SUB → The low-level unit activation state, values depend on unit type.

13 loaded units listed.
```
**1. Command:** `journalctl -u cron -n 10 --no-pager`
```text
Jul 31 05:11:51 huzefa cron[151]: (CRON) INFO (Running @reboot jobs)
Jul 31 05:17:01 huzefa CRON[564]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 05:17:01 huzefa CRON[566]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 31 05:17:01 huzefa CRON[564]: pam_unix(cron:session): session closed for user root
Jul 31 06:17:01 huzefa CRON[795]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 06:17:01 huzefa CRON[797]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 31 06:17:01 huzefa CRON[795]: pam_unix(cron:session): session closed for user root
Jul 31 06:25:01 huzefa CRON[811]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 06:25:01 huzefa CRON[813]: (root) CMD (test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily; })
Jul 31 06:25:01 huzefa CRON[811]: pam_unix(cron:session): session closed for user root
```
**2. Command:** `sudo tail -n 15 /var/log/syslog`
```text
[sudo: authenticate] Password:
2026-07-31T06:29:10.155625+00:00 huzefa systemd[379]: Reexecuting.
2026-07-31T06:29:10.164178+00:00 huzefa systemd[1]: Received SIGRTMIN+25 from PID 2016 (kill).
2026-07-31T06:29:10.169252+00:00 huzefa systemd[1]: Reexecuting.
2026-07-31T06:29:10.243000+00:00 huzefa (generators)[2036]: '/run/systemd/user-generators/wsl-user-generator' is marked world-writable, which is a security risk as it is executed with privileges. Please remove world writability permission bits. Proceeding anyway.
2026-07-31T06:29:12.026290+00:00 huzefa systemd[1]: apt-daily-upgrade.service: Deactivated successfully.
2026-07-31T06:29:12.026583+00:00 huzefa systemd[1]: Finished apt-daily-upgrade.service - Daily apt upgrade and clean activities.
2026-07-31T06:29:12.027129+00:00 huzefa systemd[1]: apt-daily-upgrade.service: Consumed 8.710s CPU time over 11.651s wall clock time, 329.5M memory peak.
2026-07-31T06:34:18.944633+00:00 huzefa PackageKit: daemon quit
2026-07-31T06:34:18.959207+00:00 huzefa systemd[1]: packagekit.service: Deactivated successfully.
2026-07-31T06:37:54.415958+00:00 huzefa systemd[1]: wsl-pro.service: Scheduled restart job, restart counter is at 2.
2026-07-31T06:37:54.425856+00:00 huzefa systemd[1]: Starting wsl-pro.service - Bridge to Ubuntu Pro agent on Windows...
2026-07-31T06:37:54.613873+00:00 huzefa wsl-pro-service[2112]: #033[36mINFO#033[0m Starting WSL Pro Service version wsl-pro-service/0.1.19
2026-07-31T06:37:54.786185+00:00 huzefa systemd[1]: Started wsl-pro.service - Bridge to Ubuntu Pro agent on Windows.
2026-07-31T06:37:55.919062+00:00 huzefa wsl-pro-service[2112]: #033[33mWARNING#033[0m Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/Huzef/.ubuntupro/.address": open /mnt/c/Users/Huzef/.ubuntupro/.address: no such file or directory
2026-07-31T06:43:59.279978+00:00 huzefa wsl-pro-service[2112]: message repeated 11 times: [ #033[33mWARNING#033[0m Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/Huzef/.ubuntupro/.address": open /mnt/c/Users/Huzef/.ubuntupro/.address: no such file or directory]
```
93 changes: 93 additions & 0 deletions 2026/day-05/linux-troubleshooting-runbook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Day 05 - Linux Troubleshooting Drill: CPU, Memory, and Logs

**Target service / process:** `cron`

## Environment Basics
**Commands:** `uname -a` and `cat /etc/os-release`
```text
Linux huzefa 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 GNU/Linux
```

**Command:** `mkdir -p /tmp/runbook-demo && cp /etc/hosts /tmp/runbook-demo/hosts-copy && ls -l /tmp/runbook-demo`

```text
total 4
-rw-r--r-- 1 huzefa huzefa 409 Aug 1 07:52 hosts-copy
```

**Commands:** `free -h and ps -C cron -o pid,%cpu,%mem,cmd`

```text
total used free shared buff/cache available
Mem: 7.6Gi 523Mi 6.9Gi 4.4Mi 351Mi 7.1Gi
Swap: 2.0Gi 0B 2.0Gi

PID %CPU %MEM CMD
151 0.0 0.0 /usr/sbin/cron -f -P

```

**Command:** `df -h`

```text
Filesystem Size Used Avail Use% Mounted on
none 3.8G 0 3.8G 0% /usr/lib/modules/6.6.87.2-microsoft-standard-WSL2
none 3.8G 4.0K 3.8G 1% /mnt/wsl
drivers 294G 182G 113G 62% /usr/lib/wsl/drivers
/dev/sdd 1007G 2.0G 954G 1% /
none 3.8G 228K 3.8G 1% /mnt/wslg
none 3.8G 0 3.8G 0% /usr/lib/wsl/lib
rootfs 3.8G 2.7M 3.8G 1% /init
none 3.8G 544K 3.8G 1% /run
none 3.8G 0 3.8G 0% /run/lock
none 3.8G 0 3.8G 0% /run/shm
none 3.8G 76K 3.8G 1% /mnt/wslg/versions.txt
none 3.8G 76K 3.8G 1% /mnt/wslg/doc
C:\ 294G 182G 113G 62% /mnt/c
D:\ 141G 2.2G 139G 2% /mnt/d
E:\ 245G 32G 213G 13% /mnt/e
F:\ 176G 277M 176G 1% /mnt/f
G:\ 99G 4.8G 94G 5% /mnt/g
tmpfs 3.8G 4.0K 3.8G 1% /tmp
none 1.0M 0 1.0M 0% /run/credentials/systemd-journald.service
none 1.0M 0 1.0M 0% /run/credentials/systemd-resolved.service
none 1.0M 0 1.0M 0% /run/credentials/getty@tty1.service
none 1.0M 0 1.0M 0% /run/credentials/console-getty.service
tmpfs 778M 12K 778M 1% /run/user/1000
```

**Command:** `ping -c 3 google.com`
```text
PING google.com (142.251.223.14) 56(84) bytes of data.
64 bytes from lcmaaa-ao-in-f14.1e100.net (142.251.223.14): icmp_seq=1 ttl=117 time=20.3 ms
64 bytes from lcmaaa-ao-in-f14.1e100.net (142.251.223.14): icmp_seq=2 ttl=117 time=17.4 ms
64 bytes from lcmaaa-ao-in-f14.1e100.net (142.251.223.14): icmp_seq=3 ttl=117 time=18.1 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 17.449/18.631/20.299/1.212 ms
```

**Command:** `journalctl -u cron -n 10 --no-pager`
```text
Jul 31 14:17:01 huzefa CRON[2559]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 14:17:01 huzefa CRON[2561]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Jul 31 14:17:01 huzefa CRON[2559]: pam_unix(cron:session): session closed for user root
Jul 31 16:17:01 huzefa CRON[2640]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Jul 31 16:17:01 huzefa CRON[2640]: pam_unix(cron:session): session closed for user root
Aug 01 06:52:01 huzefa CRON[2863]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Aug 01 06:52:01 huzefa CRON[2865]: (root) CMD (test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.monthly; })
Aug 01 06:52:01 huzefa CRON[2863]: pam_unix(cron:session): session closed for user root
Aug 01 07:17:01 huzefa CRON[2955]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Aug 01 07:17:01 huzefa CRON[2955]: pam_unix(cron:session): session closed for user root
```
```text
If this worsens (next steps)
If cron were to start failing or spiking the CPU, I would follow these 3 steps:[cite: 4]

Restart Strategy: Attempt a graceful restart using sudo systemctl restart cron and immediately monitor systemctl status cron.

Increase Log Verbosity: Check the master system logs (sudo tail -n 50 /var/log/syslog) for deeper, system-wide errors that might be affecting cron.

Resource Isolation: Use top to verify if a specific rogue cron job (a scheduled script) is the actual culprit consuming the CPU, rather than the cron daemon itself.
```
23 changes: 23 additions & 0 deletions 2026/day-06/file-io-practice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```text

huzefa@huzefa:~$ touch notes.txt
huzefa@huzefa:~$ ls
notes.txt
huzefa@huzefa:~$ echo "Line 1: Learning basic file creation." > notes.txt
huzefa@huzefa:~$ echo "Line 2: This line is appended." >> notes.txt
huzefa@huzefa:~$ cat notes.txt
Line 1: Learning basic file creation.
Line 2: This line is appended.
huzefa@huzefa:~$ echo "Line 3: Writing and displaying at the same time." | tee -a notes.txt
Line 3: Writing and displaying at the same time.
huzefa@huzefa:~$ cat notes.txt
Line 1: Learning basic file creation.
Line 2: This line is appended.
Line 3: Writing and displaying at the same time.
huzefa@huzefa:~$ head -n 2 notes.txt
Line 1: Learning basic file creation.
Line 2: This line is appended.
huzefa@huzefa:~$ tail -n 2 notes.txt
Line 2: This line is appended.
Line 3: Writing and displaying at the same time.
```
Loading