Understanding Linux Environment — The Real Engine Behind My AWS Cloud Deployment

After I deployed my Netflix Clone NGold to AWS EC2 on Day 2, I honestly thought the hard part was over. From Port Harcourt, fighting git push errors, to finally seeing my app live on 32.196.145.76:3000, I felt like a Cloud Engineer already. I was wrong. The real DevOps journey started the moment I SSHed into that black terminal screen. AWS EC2 gives you a virtual computer, but Linux is the operating system that powers it. Without understanding the Linux environment, your Cloud deployment will not survive one day in production. Docker, AWS, Kubernetes — all of them run ON Linux. That was my Day 6 lesson.

1. The Linux File System – Where Everything Actually Lives

Unlike Windows with C: and D: drives, Linux has a single tree starting from root (/). This confused me at first. Where is my app? Where are logs? I learned: /home/ubuntu is where my NGold code lives, /var/log is where all error logs hide (this saved me when my container crashed), /etc holds all system configs, and /tmp is temporary. Commands like pwd to know where you are, cd to move, ls -la to see even hidden files, and cat to read logs became my daily bread. Understanding the file system stopped me from searching blindly.

2. Permissions – Why I Got “Permission Denied” For 2 Hours

This was my biggest headache. I created deploy.sh, typed ./deploy.sh and got “permission denied”. In Linux, every file has 3 permissions: Read (r), Write (w), Execute (x) for 3 categories: Owner, Group, Others. My script had no execute permission. The fix was simple but powerful: chmod +x deploy.sh to make it executable. Then chown ubuntu:ubuntu deploy.sh to take ownership. Also chmod 600 for secret keys. This explains 80% of beginner DevOps errors on AWS. If you cannot control permissions, you cannot secure the Cloud.

3. Process Management – How I Keep NGold Alive on Port 3000

My live link 32.196.145.76:3000 is not magic. It is a Linux process. I learned ps aux to list all running processes, ps aux | grep node to check if my Node app is running, top and htop to see CPU and memory usage — my t2.micro was at 94% CPU and I didn’t know! kill -9 to stop a stuck process, and most importantly systemctl — systemctl status ngold, systemctl restart ngold, systemctl enable ngold to make it auto-start after reboot. Without process management, your live demo goes down at 2am and you won’t know.

4. Networking, Ports and Firewall

Linux controls every single port. I had to learn netstat -tulpn to see that port 3000 was actually listening, ss -tuln as a modern alternative, and how AWS Security Groups work WITH Linux’s own firewall ufw. Opening port 3000 in AWS Console is not enough — you must also allow it in Linux with sudo ufw allow 3000. This double layer is why Cloud Computing is secure. I also used curl localhost:3000 inside EC2 to test if app works internally before testing public IP.

5. My Big Realization

Cloud Computing is not just clicking “Launch Instance” on AWS dashboard. Real Cloud Engineering is 70% Linux terminal work. Mastering ls, cd, chmod, chown, ps, top, systemctl, and netstat made me understand why DevOps engineers love Linux — it gives you total control. Tomorrow on Day 7, I will automate all these manual commands with a Bash shell script so I can deploy NGold with just one command: /deploy.sh.

Stack: Linux Ubuntu 22.04 | AWS EC2 | Docker | Cloud Computing

Live: http://32.196.145.76:3000

Dairy: sirvick-deployments.blogspot.com

Comments

  1. Really insightful read, breaking down Linux, permissions, processes, and networking with real deployment experience makes the DevOps journey easy to understand. Well done legend 👍

    ReplyDelete
    Replies
    1. We really appreciate your feedback. This help us to know the area we can work for the benefit of young Cloud Engineers.

      Delete

Post a Comment

Popular posts from this blog

How I Fixed GitHub Error: failed to push some refs to github.com in 2026

How I Deployed Netflix Clone (NGold) to AWS EC2 - Live at 32.196.145.76:3000 [Docker + Nginx Guide]