Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3733ff9
Create learning-plan.md
Sharat-Anand May 14, 2026
bd28ec3
Systemd_and_Linux_Baisc_Command.md
Sharat-Anand May 16, 2026
a0cbf87
Create linux-commands-cheatsheet.md
Sharat-Anand May 18, 2026
28cf76b
Rename Linux.md to linux-architecture-notes.md
Sharat-Anand May 18, 2026
4d6ac3c
Update linux-commands-cheatsheet.md
Sharat-Anand May 19, 2026
7e97fc2
Create linux-practice.md
Sharat-Anand May 21, 2026
f9fde94
Update linux-commands-cheatsheet.md
Sharat-Anand May 21, 2026
2dc609d
Create file-io-practice.md
Sharat-Anand May 21, 2026
9625383
Update linux-architecture-notes.md
Sharat-Anand May 22, 2026
b8769c5
Create linux-troubleshooting-runbook.md
Sharat-Anand May 22, 2026
e746bd2
Update linux-commands-cheatsheet.md
Sharat-Anand May 23, 2026
ac1775f
Update linux-troubleshooting-runbook.md
Sharat-Anand May 25, 2026
d6f80f5
Create day-07-linux-fs-and-scenarios.md
Sharat-Anand May 25, 2026
789a0ec
Update day-07-linux-fs-and-scenarios.md
Sharat-Anand May 25, 2026
fa8ef64
Update day-07-linux-fs-and-scenarios.md
Sharat-Anand May 26, 2026
2cb0937
Create day-16-shell-scripting.md
Sharat-Anand May 26, 2026
d7e903a
Create day-17-scripting.md
Sharat-Anand May 28, 2026
766fbdc
Update day-17-scripting.md
Sharat-Anand May 28, 2026
2bc1458
Create day-18-scripting.md
Sharat-Anand May 28, 2026
e99bb28
Create day-19-project.md
Sharat-Anand May 28, 2026
22b5ede
Update day-19-project.md
Sharat-Anand May 29, 2026
bfdd37c
Create day-20-solution.md
Sharat-Anand May 29, 2026
8c06895
Create shell_scripting_cheatsheet.md
Sharat-Anand May 30, 2026
731600e
Create day-08-cloud-deployment.md
Sharat-Anand Jun 1, 2026
55a520f
Update linux-commands-cheatsheet.md
Sharat-Anand Jun 1, 2026
9b5be39
Create day-09-user-management.md
Sharat-Anand Jun 1, 2026
3f9e5da
Update day-09-user-management.md
Sharat-Anand Jun 1, 2026
f701656
Update linux-commands-cheatsheet.md
Sharat-Anand Jun 1, 2026
519f144
Create day-10-file-permissions.md
Sharat-Anand Jun 2, 2026
a4b8732
Create day-11-file-ownership.md
Sharat-Anand Jun 2, 2026
73599b6
Create day-12-revision.md
Sharat-Anand Jun 2, 2026
e33984e
Create day-13-lvm.md
Sharat-Anand Jun 2, 2026
bfedc5c
Create day-14-networking.md
Sharat-Anand Jun 5, 2026
57e0459
Create day-15-networking-concepts.md
Sharat-Anand Jun 5, 2026
598ba1c
Update day-14-networking.md
Sharat-Anand Jun 5, 2026
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
4 changes: 4 additions & 0 deletions 2026/day-01/learning-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Plan for 90 days
Linux basics -2 weeks
Git/Github - 1 week
Docker - 1 week
24 changes: 24 additions & 0 deletions 2026/day-02/linux-architecture-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Devops Commad and systemd
A - Application/user<br>
S - Shell (terminal where you access shell)<br>
K - Kernel<br>

BIOS runs Hardware ---> GNU GRUB load linux kernel ---> ubuntu loading --> init process/systemd<br>

File System: / --root<br>
/ > ls ---you get bin sbin called directories binaries and systembinaries<br>
/user/bin > ls --shows all the linux command<br>
/user/you dir name -- make directory inside home and work here<br>

Everything start with process<br>
Command: uname -r ----Gives version of op system Kernel free ---shows memory <br>
htop/top ---- all the process running ip addr --gives ip address<br>
ps aux | grep ping ----SS of running process systemctl start nginx/docker/python/ssh <br>
ping XXXX.com ---gives all the ip of ping Api of website systemctl status docker/ssh<br>
man <Command> (ex. man ls) ----manuel for all the command<br>
touch hello.txt --to make file<br>
mkdir ---to make directory<br>
ls -l --detail of file | ls cp in bin will show availablity<br>
cp -r file1(source) file2(destination) --copy folder/files<br>
mv file1(source) file2(destination) --rename/move files<br>
rmdir filename/ rm -r filename ---to remove directory(shift delete similar for rm command)<br>
94 changes: 94 additions & 0 deletions 2026/day-03/linux-commands-cheatsheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Process Management
systemd is the 1st process<br>
systemctl status nginx/docker --to check status of process<br>
systemctl start nginx/docker --- To start any process<br>
systemctl stop nginx/docker --- To Stop any process<br>
journalctl -u nginx/docker ---- to show all logs of an individual process<br>

# User Management
whoami ---- shoes which user is active<br>
sudo adduser xxx --- Adds user and made directory automatically <br>
sudo passwd xxx --- set up password for login<br>
su xxx --- command to enter inside user giving password (opens black bash)<br>
which bash --- which bash currently am i using (usually coloured) gives path<br>
sudo useradd -m yyy -s usr/bin/bash --- to make bash similar to **older coloured style** and using -m (Simialr to windows switching)<br>
cd / > cd home --- ls -l gives list of all users<br>
cat /etc/group --- shows all the user group<br>
sudo addgroup ggg ---making group for user<br>
sudo gpasswd -a xxx ggg ---adding user inside group. here xxx is added in group ggg along **with permission** gets added<br>
sudo gpasswd -d xxx ggg ---To remove the user from that group and revoke their permissions. Restart with newgrp current user<br>
sudo usermod -aG docker ubuntu ---Adding an Ubuntu User to the docker Group to **avoid sudo** and have permissions<br>
sudo chown ggg filename.txt ---change the individual owner of the file from ubuntu to other user only valid for individual<br>
sudo chgrp xxx filename.txt --change group owner can be done with chown (:) as well<br>
# File System
Read (cat)<br>
Write (vim/nano)<br>
Execute (shell/ ./)<br>
mkdir -p devops -----makes directory **with path** without error even if it exists do not throw error<br>
vim hello.txt > Insert i > write content > Esc > :wq(save and quit)/:q!(exit without saving)<br>
newgrp ubuntu --- changes current active primary group to the group named ubuntu for your current terminal session<br>
-rwxrwxrwx --read write execute for **owner group others** in sets of 3<br>
chmod 777 ---giving all permission / chmod 400 ----giving only read permission<br>

# Volume Mounting
lsblk ---volume/disk all attached to the server shows block with various partition<br>
xvda ---extended version is written in form **/dev/xvda**<br>
df -h ---free disk space in disk and shows mount point<br>
Attach and Mount are 2 different thing. /dev/xvda shows attachment to system<br>
Instance attached to volume is called attaching. Binding volume to a location is called mounting.<br>
EBS(Elastic block store to to create ssd) ---go to EBS in aws and create multiple volumes.<br>
select volume > Actions > Attach volume to the corrosponding instances(select correct device name) > Check through lsblk<br>
To make volume of EBS into useable volume convert into Physical Volume<br>
Logical volume size can be incraesed or decreased according to the usage<br>

LVM(Logical Volume Manager)
------------Logical Volume-----------------------
-------- --------- ----------
| 10GB | | 6GB | | |
--------- ---------- -----------
| | |
| | |
------------------------------------------------------
| Volume Group |
| |
-------------------------------------------------------
| | |
| | |
-------- --------- ----------
| 10G | | 12G | | 11 GB |
--------- ---------- -----------
--------------Physical volume-------------------

# Logical Volume Manager (LVM)
Sudo lvm ---become a root user initially. Its a tool to manage LVM having commands for mounting<br>
pvcreate /dev/xvdf /dev/xvdg /dev/xvdh ----create physical volume for 3 ebs volume available in aws<br>
pvs ---- shows the physical volume details<br>

vgcreate tws_vg /dev/xvdf /dev/xvdg ---To create Volume group using 2 physical volume earlier made. initail is the vg nam and then from the source path to be combined<br>
vgs ----shows list of all the volume from group craeted where PV is phy. vol. and LV is Logical vol.<br>

lvcreate -L 10G -n tws_lv tws_vg --- to create logical volume from the volumegroup<br>
lvs --- shows list of all the volume of group created<br>

pvdisplay ---- to display physical volume details<br>
vgdisplay ----- to display volume group details<br>
lvdisplay ---- to displaylogical volume details<br>

# How to mount volumes
Go to root always<br>
mkdir /mnt/tws_lv_mount --- create a temproary directory which creates a location where volume is mounted<br>
mkfs.ext4 /dev/tws_vg/tws_lv ---to format the path and create space and make file system<br>
mount /dev/tws_vg/tws_lv /mnt/tws_lv_mount --mount the logical volume to specified location craeted before to bind the path<br>
umount /mnt/tws_lv_mount ---to unmount the volume directory<br>
Now you can use the path to craete directory and work here /mnt/tws_lv_mount<br>

# Directly mount physical volume to disk mount
No need to go to room <br>
mkdir /mnt/tws_disk_mount ----this is to create space for disk mount directly from phy. vol.<br>
mkfs -t ext4 /dev/xvdh ----file system to mount disk store<br>
mount /dev/xvdh /mnt/tws_disk_mount --- mounting disk to the destination<br>
df -h --to check all the disk mounted<br>

# Dynamic storage management with EBS(AWS)
Adding extra storage to Logical Volume<br>
lvm > lvextend -L +5G -n /dev/tws_vg/tws_lv <br>
36 changes: 36 additions & 0 deletions 2026/day-04/linux-practice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Systemctl status ssh/docker --- to see the curreent status of a single process<br>
<img width="941" height="132" alt="image" src="https://github.com/user-attachments/assets/a753e730-bd4e-4edc-90e3-bb630f2359da" />

sudo systemctl start nginx/docker/ssh ----to stop the process <br>
<img width="970" height="110" alt="image" src="https://github.com/user-attachments/assets/06be6f0b-e541-46d4-96ee-379b89a0044b" />

sudo systemctl stop nginx/docker/ssh ----to stop the process<br>
<img width="971" height="157" alt="image" src="https://github.com/user-attachments/assets/eec3aa2d-1fea-4b8f-bb2f-2ac99a5aa238" />

ping zeiss.com ---Sends icmp packets to the hosts<br>
htop -- to see the running status of the process and track live running process<br>
<img width="1022" height="522" alt="image" src="https://github.com/user-attachments/assets/107a7da9-5eb9-4448-bb0d-cb702a94fa55" />

ps aux | grep zeiss --it create the screen shot of the process and grep filter the required process<br>
kill -9 PID --force kill the running process<br>
kill PID --kill the process<br>
<img width="1086" height="205" alt="image" src="https://github.com/user-attachments/assets/1d504474-630b-401e-9678-a9134758541d" />

systemctl list-units ----command displays all currently loaded and active \(systemd\) units (like services, sockets, and mount points) in memory.<br>
systemctl list-units --state=failed<br>
systemctl list-units --state=waiting<br>
<img width="1342" height="187" alt="image" src="https://github.com/user-attachments/assets/2611afdc-3add-4d46-ae22-d1535ef20661" />

journalctl -u docker/nginx/ssh --- to see all the log file of a sinle process<br>
<img width="1447" height="92" alt="image" src="https://github.com/user-attachments/assets/59708455-c1e3-4761-9adc-7ceb5abc13f0" />

head -n 5 <file name> --- this is to see first 5 line in log files or any files<br>
<img width="1447" height="230" alt="image" src="https://github.com/user-attachments/assets/aa441a6c-cc10-4399-a00e-227c567e6d3d" />

tail -n 5 <file name> --- this is to see last 5 line in log files or any files<br>
<img width="1446" height="207" alt="image" src="https://github.com/user-attachments/assets/3b260983-9870-4fe7-9afc-c69db584635f" />

# Process additional command
pstree ubuntu --- Visualizes running processes in a hierarchical, parent-child tree structure<br>
pgrep nginx --- Searches for processes by name and returns their Process IDs (PIDs) <br>
<img width="487" height="341" alt="image" src="https://github.com/user-attachments/assets/977cafe5-2d1d-4f4c-bf6c-aca0c5c3718c" />
67 changes: 67 additions & 0 deletions 2026/day-05/linux-troubleshooting-runbook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Environment Basic
uname -a --give details aboutabout the Linux kernel and hardware architecture (What it outputs: Kernel version, kernel build date, CPU architecture)<br>
lsb_release -a (The Legacy Standard) --- prints all available Linux Standard Base (LSB) and **distribution-specific** version details<br>
cat /etc/os-release (The Modern Standard) --- tells you about the specific **Linux distribution** (OS) and its version<br>
<img width="1262" height="527" alt="image" src="https://github.com/user-attachments/assets/2ac70fb0-bec5-4c8d-abed-2fe8a4c174fe" />

# filesystem sanity
mkdir /tmp/runbook-demo ---make directory<br>
cp /etc/hosts /tmp/runbook-demo/hosts-copy && ls -l /tmp/runbook-demo --copy directory file from hosts to copy hosts and dispalys permission<br>
<img width="1157" height="112" alt="image" src="https://github.com/user-attachments/assets/ef507f8c-4b97-4786-82d4-1069b710bf26" />

# Troubleshooting
systemctl status docker --- one target service/process to see the status<br>
<img width="1047" height="116" alt="image" src="https://github.com/user-attachments/assets/597b3818-588f-419b-b3eb-691cc1c53e5c" />

htop --to see the running process
<img width="1338" height="126" alt="image" src="https://github.com/user-attachments/assets/cb02c30d-793a-490b-ac12-b44487bb3595" />
<img width="1640" height="163" alt="image" src="https://github.com/user-attachments/assets/740b5135-7c23-4aff-891e-2646d713df01" />

# customized details of CPU / Memory <br>
ps -o pid,pcpu,pmem,comm -p <pid> --- ps is process -o user-defined format pid - unique process id<br>
pcpu --- details about cpu pmem --- detail about memory<br>
comm --- short executable command -p <pid>--- specific process ID<br>
free -h --- shows free space in human redeable format. without -h it is in byte format<br>
<img width="982" height="276" alt="image" src="https://github.com/user-attachments/assets/357d0c1c-e675-4a8d-bb26-aaa64ecf84b3" />

# Disk / IO
df -h --detail of file system mounted<br>
du -sh /var/log --- calculates and displays the total disk space used by the /var/log folder in redeable format number<br>
iostat --- Focuses heavily on storage drive performance and input/output (I/O) speeds and idle time<br>
vmstat --- Focuses heavily on virtual memory, RAM, paging, processes, and CPU activity(Virtual Memory Statistics)<br>
dstat --- Combines both tools into a single, Everything simultaneously—CPU, disk, network, and memory(Versatile Statistics)<br>
<img width="1165" height="957" alt="image" src="https://github.com/user-attachments/assets/486b7db3-9bcb-450d-b4a8-50e4229b7eb8" />

# Network
ss -tulpn -- display all open and listening network ports<br>
<img width="1241" height="227" alt="image" src="https://github.com/user-attachments/assets/0e9bdab3-aeb7-4836-a5e7-e7870b742d85" />

netstat -tulpn --- displays same data but its old style <br>
<img width="1162" height="163" alt="image" src="https://github.com/user-attachments/assets/2b8c9bee-d9ae-4202-a389-b53876e4099f" />

ping zeiss.com --checks network connectivity at the system level using ICMP (Is the server powered on and reachable?)<br>
curl -I API ---- checks application-layer web responses using HTTP(give full address) (Is the web application/API running and healthy?)<br>
<img width="953" height="302" alt="image" src="https://github.com/user-attachments/assets/e850a2ef-eade-48a9-b0e8-d16666cd19a4" />

# Logfile
journalctl -u docker -n 5 ---shows the detail of any running process depending on number of lines asked (here 5 lines of docker)<br>
tail -n 5 /var/log/syslog --- last 5 lines of a particular log files <br>
<img width="1451" height="348" alt="image" src="https://github.com/user-attachments/assets/4ef3ee13-4ab1-4129-a2cf-2988d1102e30" />

# If this worsens(example Nginx)
Nginx Troubleshooting ChecklistFollow this sequential checklist to diagnose, configure, and isolate web server failures<br>
Phase 1: Initial Triage & VerificationVerify OS Environment: Run cat /etc/os-release to confirm the distribution baseline.<br>
Test Network Reachability: Run ping <target-ip> to verify the physical server is online.<br>
Inspect HTTP Headers: Run curl -I http://localhost to capture the exact status code (e.g., 502 Bad Gateway).<br>
Audit Open Ports: Run sudo ss -tulpn to ensure Nginx is actively listening on ports 80/443.

Phase 2: Elevate Verbosity (The "If This Worsens" Plan)<br>
Open Configuration: Run sudo nano /etc/nginx/nginx.conf (Do not use cd).
Enable Debug Logs: Locate the error_log directive and append debug to the end of the line:**nginxerror_log /var/log/nginx/error.log debug**<br>
Test Layout Syntax: sudo nginx -t ---- to verify there are no missing semicolons or typos.<br>
Apply Changes Safely: sudo systemctl reload nginx --- to load the settings without dropping user traffic.<br>
Stream Live Errors: sudo tail -f /var/log/nginx/error.log --- to watch the debug output in real time.

Phase 3: Advanced Diagnostics & RecoveryTrace System Calls: Run sudo strace -fp <PID> -e trace=network,file on a worker PID if the process hangs.Isolate and Restart: If the state corrupts, run sudo systemctl stop nginx, confirm ports are vacant with ss, then run sudo systemctl start nginx.


15 changes: 15 additions & 0 deletions 2026/day-06/file-io-practice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Operation in files
touch notes.txt ---- creates file with name notes <br>
echo "Line 1" > notes.txt -----add content to the line and over write if anything written<br>
echo "Line 2" >> notes.txt ----add content and append the content at the end it do not overwrite<br>
echo "Line 3" | tee -a notes.txt ---display the content as well as append at last. If -a not there it will overwrite<br>
cat notes.txt ---displayes the overall output
head -n 2 notes.txt ---diaplays firat 2 line<br>
tail -n 2 notes.txt ---displays last 2 lines<br>
<img width="1025" height="487" alt="image" src="https://github.com/user-attachments/assets/1c18571c-51a7-4e3c-be24-b2456154a91c" />

# Negative scenarios of > and tee without -a will overwrite whole file
echo "Line 1" > notes.txt -----add content to the line and over write if anything written<br>
echo "Line 2" >> notes.txt ----add content and append the content at the end it do not overwrite<br>
echo "Line 3" | tee notes.txt ---display the content as well as append at last. If -a not there it will overwrite<br>
<img width="1032" height="227" alt="image" src="https://github.com/user-attachments/assets/25146a24-146f-4fa1-8b9a-535f993e8f3d" />
49 changes: 49 additions & 0 deletions 2026/day-07/day-07-linux-fs-and-scenarios.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Linux File System Hierarchy
Symbol / --root consists of all folder. System starts from here<br>
/ > ls -l ---you get bin sbin called directories binaries and system binaries<br>
/user/bin > ls --shows all the linux command<br>
/bin --- Essential command binaries all the commands are either on bin and system command is in sbin<br>
/user/<your directory> -- make directory inside home and work here<br>
/opt --- Optional/third-party applications<br>

/var/log - **Log files** -- all log files and can open through vim<br>
<img width="550" height="232" alt="image" src="https://github.com/user-attachments/assets/96317d6a-93e9-4b40-a81f-1ba441353b4f" />

du -sh /var/log/* 2>/dev/null -- du -sh --is disk space -sh flah is summerize and human readable the log file, *wildcard to trace all<br>
-- 2>dev/null ---its a black hole where all eoor goes for example permission denied

Find the largest log file in /var/log. Use of log file scenario
du -sh /var/log/* 2>/dev/null | sort -h | tail -n 5 --sort and gives result of last 5 files<br>
<img width="692" height="132" alt="image" src="https://github.com/user-attachments/assets/f7ce3f71-7c07-4b96-912a-d0c6d0a6b0a6" />

Negative scenarios --- this is without blackhole(**2>/dev/null**)<br>
<img width="588" height="187" alt="image" src="https://github.com/user-attachments/assets/91c0cfa2-09f1-43a2-9b2c-dc3e88048604" />

Look at a config file in /etc --shows which host is aasigned<br>
cat /etc/hostname ---displays the unique network name assigned to your Linux system<br>

Check your home directory
ls -la ~ ---list aal hidden file but ~ is used to access home directory from anywhere

# Scenario 1
systemctl status myapp ----Check the status of myapp<br>
systemctl is-enabled myapp --is system enabled<br>
sudo journalid -u myapp -e --no-pager --check the log file in chronological order<br>
sudo ss -tulpn -- Check other service (like Apache or Nginx) already grabbed the port myapp needs<br>

# Scenario 2
htop --to see memory usage
ps aux --sort=-pcpu | head -n 5 -- (-pcpu) arrange in decending and apply head or remove minus and apply tail<br>

# Scenario 3
systemctl status docker ---status of docker <br>
journalctl -u docker -n 50 ---chek log file<br>
journalctl -u docker -f --follow log in real time<br>

# Scenario 4
ls -l home/user/backup.sh --to check the permission<br>
chmod a+x home/user/backup.sh --gives permission to execute to all<br>
ls -l home/user/backup.sh --verify all cmd has r-xr-xr-x permission<br>
(or) chmod 755 will work --based on number system but it has all the group<br>


18 changes: 18 additions & 0 deletions 2026/day-08/day-08-cloud-deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Part 1: Launch Cloud Instance & SSH Access
Step 1: Create a Cloud Instance<br>
Step 2: Connect via SSH<br>

# Part 2: Install Docker & Nginx
Step 1: Update System --- sudo apt update<br>
Step 3: Install Nginx -- sudo apt-get install nginx<br>
Verify Nginx is running: -- systemctl status nginx<br>

# Part 3: Security Group Configuration
http://51.21.160.162/
<img width="1227" height="377" alt="image" src="https://github.com/user-attachments/assets/27aa8f74-701c-4664-8ea4-ad1654737b36" />

# Part 4: Extract Nginx Logs
Step 1: View Nginx Logs --- cd /var/log/nginx<br>
tail -f /var/log/nginx/access.log<br>
Step 2: Save Logs to File(~ home) --- cp -r error.log ~/nginx.txt<br>
Step 3: Download Log File to Your Local Machine --- scp -i shell-scripting.pem ubuntu@51.21.160.162:~/nginx.txt .<br>
Loading