Skip to main content

Command Palette

Search for a command to run...

🐧 Day 3 of My DevSecOps Journey

Published
β€’4 min read
🐧 Day 3 of My DevSecOps Journey

Linux Basics, Architecture, AWS, Users, Permissions & SSH (Beginner-Friendly Guide)

Today was a deep dive into the world of Linux, a skill every DevOps/DevSecOps engineer must master.
I explored Linux history, architecture, authentication, AWS security groups, file permissions, users, groups, and even connecting VM-to-VM using SSH keys.

Here’s everything I learned β€” explained simply, visually, and with emojis πŸ‘‡


🏁 1️⃣ Introduction to Linux β€” How It All Started

  • Unix was originally a closed-source operating system.

  • Linux was created as an open-source alternative, built on Unix concepts.

  • Over time, Linux grew into many distributions (flavors) such as:

    • 🟦 Ubuntu

    • 🟩 Debian

    • πŸ”΄ RedHat

    • 🟒 CentOS

    • 🟧 Amazon EC2 Linux

  • Best practice: Always use LTS (Long-Term Support) versions for stability & security.


🧱 2️⃣ Linux Architecture β€” Visual & Easy Explanation

Linux is built in layers, just like an organization:

πŸ§‘β€πŸ’» User Applications

Apps we interact with: browsers, Docker, Jenkins, etc.

βš™οΈ System Utilities

Basic commands & tools:
ls, cp, mv, mkdir, etc.

πŸ“š System Libraries

Pre-written code that applications use to perform tasks.

🧠 Kernel

The β€œheart” of Linux β€” manages:

  • Memory

  • Processes

  • File systems

  • Communication between software & hardware

πŸ’½ Hardware Layer

CPU, RAM, Storage, Network Cards, etc.

Simple visual:

------------------------
| User Applications    |
------------------------
| System Utilities     |
------------------------
| System Libraries     |
------------------------
| Kernel               |
------------------------
| Hardware             |
------------------------

πŸ’Ώ 3️⃣ Setting Up Ubuntu & Authentication Methods

Linux supports two main authentication types:

πŸ” 1. Username + Password

Simple but less secure.

  • More secure

  • No password required

  • Safer for production environments

Also learned how certain ports (like 8080, 3200 etc.) need to be open for remote access.


πŸ”₯ 4️⃣ Understanding Security Groups & Networking

Security Groups (SGs) work like firewalls:

πŸ“₯ Inbound Rules

Define what traffic can enter the machine (e.g., SSH, HTTP).

πŸ“€ Outbound Rules

Define what traffic can leave the machine.

πŸ” Why VPN is needed sometimes?

Some internal sites are only accessible through a VPN.
Your laptop β†’ VPN β†’ Secure Network β†’ VM
Without VPN, access is denied because the VM trusts only specific IP ranges or ports.

🟧 AWS Hands-On

I learned how to:

  • Select an AMI

  • Configure an instance

  • Open ports

  • Launch an EC2 Linux server


πŸ“ 5️⃣ Important Linux Folders Explained

I explored key directories:

FolderMeaning
/rootSuperuser home directory
/binEssential commands
/sbinSystem-level commands
/bootBootloader files
/devDevice files
/etcConfiguration files
/homeUser home folders
/lib / /lib64Libraries
/media / /mntMounted drives
/optOptional software
/tmpTemporary files
/varLogs, caches, dynamic data

πŸ‘₯ 6️⃣ User & Group Management in Linux

⭐ Root User

The superuser β†’ full permissions.

πŸ‘€ Regular Users

Restricted access β†’ must use sudo for admin tasks.

πŸ”‘ Key Learnings:

  • Create users

  • Create groups

  • Add/remove users from groups

  • Switch users (su)

  • Change passwords

  • Lock/unlock accounts

  • Delete users safely

  • Use multiple SSH keys for multiple user access

Linux commands I practiced:

  • ls, cd, cp, mv, mkdir, touch, cat

  • useradd, groupadd, usermod

  • passwd, deluser, gpasswd


πŸ” 7️⃣ File & Folder Permissions

Linux permissions follow this pattern:

r = read  
w = write  
x = execute

Used chmod to:

  • Add/remove permissions

  • Manage file execution

  • Secure sensitive files

Example:

chmod 755 file.sh
chmod u+x script.sh

πŸ”‘ 8️⃣ SSH Key Pair Generation & VM-to-VM Communication

Generated SSH keys using:

ssh-keygen -t rsa -b 4096 -C "practise-keys"

Then learned how to:

  • Copy public key to another VM

  • Connect two VMs using SSH

  • Login between servers without passwords

This was a great hands-on practice for real infrastructure setups.


🎯 Day 3 Takeaway

Linux is at the core of DevOps & DevSecOps, and today, it helped me build a strong foundation in:

βœ”οΈ Architecture
βœ”οΈ Security
βœ”οΈ Networking
βœ”οΈ AWS concepts
βœ”οΈ Users & Permissions
βœ”οΈ SSH & Authentication

I’ll be sharing my Day 4 learnings tomorrow β€” Stay Tuned 🫑

More from this blog

D

DevSecOps - Zero To Hero

19 posts