Skip to content

Deep8595/Linux-devOps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Linux for DevOps using AWS EC2 (Ubuntu) 🐧☁️

This guide explains how to use AWS EC2 Ubuntu as a Linux machine for DevOps practice. You can use this VM for Linux commands, Git, Docker, CI/CD, deployment, and automation.


🎯 Purpose of Using Linux on AWS EC2 for DevOps

  • Practice Linux commands on real server
  • Deployment environment
  • CI/CD pipeline server
  • Docker & Kubernetes practice
  • Git server operations
  • Log monitoring
  • Automation scripting
  • Production-like environment

🚀 Step 1 — Create Linux VM (Ubuntu EC2)

Launch instance with:

Name: devops-linux-server
AMI: Ubuntu Server 22.04 LTS
Instance: t2.micro
Security: Allow SSH, HTTP, HTTPS

Download key:

devops.pem

🔐 Step 2 — Connect to Linux Server

chmod 400 devops.pem
ssh -i devops.pem ubuntu@your-ec2-ip

Now you are inside Linux machine.


🐧 Basic Linux Commands for DevOps

File Commands

pwd
ls
ls -la
cd /var/www
mkdir project
rm -rf folder

File Viewing

cat file.txt
less file.txt
tail -f app.log

📦 Install DevOps Tools on Linux

Update system

sudo apt update && sudo apt upgrade -y

Install Git

sudo apt install git -y

Install Docker

sudo apt install docker.io -y
sudo systemctl start docker
sudo systemctl enable docker

Install Node

sudo apt install nodejs npm -y

🌐 Linux Networking Commands

ip a
ping google.com
curl localhost:3000
netstat -tulnp

⚙️ Process Management

ps aux
top
kill -9 PID

📊 Monitor Linux Server

Check memory

free -m

Check disk

df -h

Check CPU

top

📜 Linux Logs (DevOps Important)

System logs

tail -f /var/log/syslog

Nginx logs

tail -f /var/log/nginx/access.log

App logs

tail -f app.log

🔄 DevOps Deployment on Linux

Clone repository

git clone https://github.com/user/project.git
cd project

Install dependencies

npm install

Run app

npm start

Run in background

nohup npm start &

🔐 Linux Permissions (DevOps Must Know)

chmod 777 file
chmod +x deploy.sh
chown ubuntu:ubuntu file

🔁 Service Management

Start service

sudo systemctl start nginx

Stop service

sudo systemctl stop nginx

Restart service

sudo systemctl restart nginx

🧠 DevOps Linux Workflow

Create EC2 Ubuntu
        ↓
SSH into Linux
        ↓
Install Git/Docker
        ↓
Clone Repository
        ↓
Build Application
        ↓
Run Application
        ↓
Monitor Logs

⭐ Most Important Linux Commands for DevOps

ssh
ls
cd
pwd
chmod
chown
grep
find
top
kill
ps
df -h
free -m
tail -f
systemctl

📌 Use Case

  • Linux practice
  • DevOps practice
  • Deployment server
  • CI/CD server
  • Docker host
  • Kubernetes node
  • Cloud Linux machine

About

Linux for DevOps using AWS EC2 (Ubuntu) with commands, setup, deployment and server management guide.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors