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.
- 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
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
chmod 400 devops.pem
ssh -i devops.pem ubuntu@your-ec2-ipNow you are inside Linux machine.
pwd
ls
ls -la
cd /var/www
mkdir project
rm -rf foldercat file.txt
less file.txt
tail -f app.logUpdate system
sudo apt update && sudo apt upgrade -yInstall Git
sudo apt install git -yInstall Docker
sudo apt install docker.io -y
sudo systemctl start docker
sudo systemctl enable dockerInstall Node
sudo apt install nodejs npm -yip a
ping google.com
curl localhost:3000
netstat -tulnpps aux
top
kill -9 PIDCheck memory
free -mCheck disk
df -hCheck CPU
topSystem logs
tail -f /var/log/syslogNginx logs
tail -f /var/log/nginx/access.logApp logs
tail -f app.logClone repository
git clone https://github.com/user/project.git
cd projectInstall dependencies
npm installRun app
npm startRun in background
nohup npm start &chmod 777 file
chmod +x deploy.sh
chown ubuntu:ubuntu fileStart service
sudo systemctl start nginxStop service
sudo systemctl stop nginxRestart service
sudo systemctl restart nginxCreate EC2 Ubuntu
↓
SSH into Linux
↓
Install Git/Docker
↓
Clone Repository
↓
Build Application
↓
Run Application
↓
Monitor Logs
ssh
ls
cd
pwd
chmod
chown
grep
find
top
kill
ps
df -h
free -m
tail -f
systemctl- Linux practice
- DevOps practice
- Deployment server
- CI/CD server
- Docker host
- Kubernetes node
- Cloud Linux machine