0% found this document useful (0 votes)
16 views3 pages

DevOps Linux Commands Cheat Sheet

This document is a cheat sheet for essential Linux commands used in DevOps, covering file and directory management, permissions, searching and filtering, process monitoring, networking, service management, logs, user management, archiving, Git, Docker, Kubernetes, CI/CD, AWS CLI, and advanced commands. Each section provides specific command examples for various tasks. It serves as a quick reference guide for system administrators and DevOps professionals.

Uploaded by

muhammad imran
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

DevOps Linux Commands Cheat Sheet

This document is a cheat sheet for essential Linux commands used in DevOps, covering file and directory management, permissions, searching and filtering, process monitoring, networking, service management, logs, user management, archiving, Git, Docker, Kubernetes, CI/CD, AWS CLI, and advanced commands. Each section provides specific command examples for various tasks. It serves as a quick reference guide for system administrators and DevOps professionals.

Uploaded by

muhammad imran
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DEVOPS LINUX COMMANDS CHEAT SHEET

1. FILE & DIRECTORY COMMANDS


ls -la → list files
cd /var/log → change directory
mkdir app-config → create folder
rm -rf old-build → delete folder
cp [Link] /etc/[Link] → copy file
mv [Link] [Link] → rename
touch [Link] → create empty file

2. PERMISSIONS
chmod 755 [Link] → change permission
chmod +x [Link] → make executable
chown ubuntu:ubuntu /var/www → change owner

3. SEARCH & FILTER


find / -name "[Link]"
grep "ERROR" /var/log/syslog
awk '{print $2}' file
sed -i 's/old/new/g' file

4. PROCESS & SYSTEM MONITORING


ps aux
top
kill -9 1234
free -h
uptime
df -h
du -sh /var/log

5. NETWORKING
ip a
ping [Link]
wget [Link]
curl -I [Link]
ss -tulpn
traceroute [Link]
dig [Link]

6. SERVICES (systemctl)
systemctl start nginx
systemctl restart docker
systemctl status ssh

7. LOGS
tail -f /var/log/syslog
less /var/log/[Link]

8. USER MANAGEMENT
adduser imran
usermod -aG sudo imran

9. ARCHIVING
tar -cvf [Link] /var/www
tar -xvf [Link]
zip -r [Link] prod/

10. GIT
git clone repo-url
git status
git add .
git commit -m "msg"
git log --oneline

11. DOCKER
docker ps
docker run -d -p 8080:80 nginx
docker exec -it container bash
docker build -t myapp:v1 .

12. KUBERNETES
kubectl get pods
kubectl describe pod pod-name
kubectl apply -f [Link]
kubectl logs -f pod-name

13. CI/CD
bash [Link]
env
export NODE_ENV=production

14. AWS CLI


aws s3 ls
aws s3 cp file s3://bucket
aws ec2 describe-instances

15. ADVANCED
nohup node [Link] &
jobs
vmstat 1

You might also like