From 65f37ea313953875ab4e43666a94e49891302f8e Mon Sep 17 00:00:00 2001 From: Akashdeep Singh Date: Mon, 9 Feb 2026 22:33:38 +1100 Subject: [PATCH] Add your changes for week01 --- 2026/day-01/learning-plan.md | 2 + 2026/day-02/linux-architecture-notes.md | 15 ++++ 2026/day-03/linux-commands-cheatsheet.md | 30 ++++++++ 2026/day-04/linux-practice.md | 15 ++++ 2026/day-05/linux-troubleshooting-runbook.md | 77 ++++++++++++++++++++ 2026/day-06/file-io-practice.md | 39 ++++++++++ 2026/day-07/README.md | 2 +- 2026/day-07/day-07-linux-fs-and-scenarios.md | 51 +++++++++++++ 8 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 2026/day-01/learning-plan.md create mode 100644 2026/day-02/linux-architecture-notes.md create mode 100644 2026/day-03/linux-commands-cheatsheet.md create mode 100644 2026/day-04/linux-practice.md create mode 100644 2026/day-05/linux-troubleshooting-runbook.md create mode 100644 2026/day-06/file-io-practice.md create mode 100644 2026/day-07/day-07-linux-fs-and-scenarios.md diff --git a/2026/day-01/learning-plan.md b/2026/day-01/learning-plan.md new file mode 100644 index 000000000..fb5e6a5ac --- /dev/null +++ b/2026/day-01/learning-plan.md @@ -0,0 +1,2 @@ +in simple understanding devops means complete end to end process desigining and deploying applications.consists of two words dev +ops +dev means development in which code ,plan and features are included but in operations (ops) the code si deployed on servers where continous monitoring happens \ No newline at end of file diff --git a/2026/day-02/linux-architecture-notes.md b/2026/day-02/linux-architecture-notes.md new file mode 100644 index 000000000..06c11f463 --- /dev/null +++ b/2026/day-02/linux-architecture-notes.md @@ -0,0 +1,15 @@ +* process states +1 running- means the process is currently in execution +2 sleep -process waiting for its execution +3 stopped - proces is paused by user or other +4 zombie - hwne process is terminianted but in process table and wiating for exit +5 dead - when process is completely terminated and nt present in process table +* 5 commands that i will use daily +cd - to navigate between dir +mkdir - create a new dir +vim - for text editor +touch - for creating new file +man - for description +pwd - to check current working directory +systemctl - to know logs of system + diff --git a/2026/day-03/linux-commands-cheatsheet.md b/2026/day-03/linux-commands-cheatsheet.md new file mode 100644 index 000000000..a1aeaa362 --- /dev/null +++ b/2026/day-03/linux-commands-cheatsheet.md @@ -0,0 +1,30 @@ +* Basic commands +cd - to navigate between dir +mv - to move or rename file +cp -copy file +pwd - current directory +ls - lsit all files +ls -a - list hidden files +ls -l - list the permissions of file +mkdir - make dir +touch - create file +whoami - display user name +cat - edit file +* adding user or group +useradd - add user in environment +useradd -m - add suer in home dir also +groupadd - add new group +usermod - to modify the permissions +chown - change owership +chgrp - change group ownership +ssh-keygen = genrate new keys +su - to with users +* file permissions +chmod - change permissions +* to know about systems +systemctl - to manage service on linux like start,stop,restart,reload + +* network commands +ipcongig - to check all ip address +ping - send ICMP requests +dig - Dns lookups in nslookups \ No newline at end of file diff --git a/2026/day-04/linux-practice.md b/2026/day-04/linux-practice.md new file mode 100644 index 000000000..d6712b9ff --- /dev/null +++ b/2026/day-04/linux-practice.md @@ -0,0 +1,15 @@ +Process checks +ps - snapshot of current process +top - this provides dynamic view of running system +pgrep - looks htrough the currently running process and lists the process IDs + pgrep [options] pattern + +Service checks +systemctl - gives log for system and controls systemd +systemctl list-units - units are a managed resource this command helps to check the acitve services,sockets,mounts + +Log checks +journalctl -u ssh - print logs of the specific service +tail -n - 50 this shows the last 50 entries + +Mini troubleshooting steps diff --git a/2026/day-05/linux-troubleshooting-runbook.md b/2026/day-05/linux-troubleshooting-runbook.md new file mode 100644 index 000000000..c929a8e72 --- /dev/null +++ b/2026/day-05/linux-troubleshooting-runbook.md @@ -0,0 +1,77 @@ + + +## Target Service +ssh (OpenSSH Server) + +## Environment +- Kernel: Linux 6.14.0-1018-aws (x86_64) +- OS: Ubuntu 24.04.3 LTS (Noble Numbat) +- System uptime low, clean boot state + +## Filesystem Sanity Check +Commands: +- mkdir /tmp/runbook-demo +- cp /etc/hosts /tmp/runbook-demo/hosts-copy + +Observations: +- Temporary directory created successfully +- File copy succeeded with normal permissions +- Filesystem is writable and healthy + +## CPU & Memory +Commands: +- top- this provide the list fo processes +- free -h - this display the storage in human readable format + +Observations: +- CPU is 99% idle, load average near zero +- No high CPU processes observed +- Memory usage is low with ~510MB available +- No swap usage or memory pressure + +## Disk & IO +Commands: +- df -h- This display file system usage in 1000 powers +- du -sh /var/log + +Observations: +- Root filesystem only 36% utilized +- /var/log size is ~35MB +- No disk space or IO concerns + +## Network +Commands: +- ss -tulpn +- ping -c 3 localhost + +Observations: +- sshd listening on port 22 (IPv4 and IPv6) +- Localhost connectivity is healthy +- No packet loss or latency issues + +--- + +## Logs Reviewed +Commands: +- journalctl -u ssh -n 50 +- tail -n 50 /var/log/auth.log + +Observations: +- SSH service starts cleanly after reboot +- Successful key-based logins observed +- No authentication errors or service crashes +- Log entries appear normal and expected + +--- + +## Quick Findings +- System resources are healthy +- SSH service is stable and responsive +- No indicators of CPU, memory, disk, or network issues +- Logs show normal operational behavior + +--- + +## If This Worsens (Next Steps) +1. Restart ssh service gracefully using systemctl and monitor logs +2. Investigate failed login attempts and review firewall or security group rules \ No newline at end of file diff --git a/2026/day-06/file-io-practice.md b/2026/day-06/file-io-practice.md new file mode 100644 index 000000000..5e4fec9f8 --- /dev/null +++ b/2026/day-06/file-io-practice.md @@ -0,0 +1,39 @@ +root@Asus:/mnt/c/users/# cd documents +root@Asus:/mnt/c/users/documents# touch name.txt +root@Asus:/mnt/c/users/documents# cat "hello my name is " > name.txt +cat: 'hello my name is ': No such file or directory +root@Asus:/mnt/c/users/documents# man cat +root@Asus:/mnt/c/users/documents# man touch +root@Asus:/mnt/c/users/documents# mv name.txt notes.txt +root@Asus:/mnt/c/users/documents# echo "hello my name si :" > notes.txt +root@Asus:/mnt/c/users/documents# echo "hi everyone" >> notes.txt +root@Asus:/mnt/c/users/documents# echo "I am student of batch 10 " >> notes.txt +root@Asus:/mnt/c/users/documents# cat notes.txt +hello my name si : +hi everyone +I am student of batch 10 +root@Asus:/mnt/c/users/documents# head notes.txt +hello my name si : +hi everyone +I am student of batch 10 +root@Asus:/mnt/c/users/documents# man head +root@Asus:/mnt/c/users/documents# head -n 2 notes.txt +hello my name si : +hi everyone +root@Asus:/mnt/c/users/documents# tail -n 2 notes.txt +hi everyone +I am student of batch 10 +root@Asus:/mnt/c/users/documents# tee "hello" >notes.txt +hello +my name is +i am student of batch 10 +^C +root@Asus:/mnt/c/users/documents# cat notes.txt +hello +my name is +i am student of batch 10 +root@Asus:/mnt/c/users/documents# tee hello +hello +hello +i am +i am \ No newline at end of file diff --git a/2026/day-07/README.md b/2026/day-07/README.md index 613b24133..379331d87 100644 --- a/2026/day-07/README.md +++ b/2026/day-07/README.md @@ -116,7 +116,7 @@ Write at least 4 commands in order. - Then check: What do the logs say? - Finally check: Is it enabled to start on boot? -**Commands to explore:** `systemctl status myapp`, `systemctl is-enabled myapp`, `journalctl -u myapp -n 50` +**Commands to explore:** `systemctl status myapp`, ` myapp`, `journalctl -u myapp -n 50`systemctl is-enabled **Resource:** Review Day 04 (Process and Services practice) diff --git a/2026/day-07/day-07-linux-fs-and-scenarios.md b/2026/day-07/day-07-linux-fs-and-scenarios.md new file mode 100644 index 000000000..55426bfa1 --- /dev/null +++ b/2026/day-07/day-07-linux-fs-and-scenarios.md @@ -0,0 +1,51 @@ +### Part 1: Linux File System Hierarchy +- '/' (root) - This contains the boot files of system +- '/home' - this conatisn file configurations and users +- `/root' - This is subdirectory inside '/' which has full user access +- 'etc' - this contains editable configurations files +- '/var/log' - This contains the log of system +- '/tmp' - these are created for short term uses and they got deleted when system reboots + +### Part 2: Scenario-Based Practice +**Scenario 1: Service Not Starting** +Step 1: systemctl status +Why: This will display the status +s +Step 2: journalctl +why :this will display recent logs + +Step 3: systemctl start my-app +Why: this will again start the application + +step 4: systemctl is-enabled +why : to check is service is enabled + +**Scenario 2: High CPU Usage** +step 1: top +why : this will display the top processes executing / htop has interactive display + +step 2: htop +why : htop has interactive display where i can scroll also + +step 3 : ps aux --sort=-%cpu | head -10 +why : this will sort the process and then print first 10 processes + +**Scenario 3: Finding Service Logs** +step 1 : journalctl -u docker.io +why : this will display the logs of docker + +step 2 :journalctl -u docker.service -n 50 +why : this will show last 50 lines + +step 3: journalctl -u docker.service -f +why : this will show me the docker logs in real time + +**Scenario 4: File Permissions Issue** +step 1 : ls -l +why : firstly check the permsission of file + +Step 2 : chmod u+x file_name.sh +why : then give execute perimission to user + +step 3: ls-l +why :rwxr--r-- this means owner got permission to execute