Please open Telegram to view this post
VIEW IN TELEGRAM
1️⃣ Check server uptime:
uptime
2️⃣ Check disk usage:
df -h
3️⃣ Check memory usage:
free -m
4️⃣ Check CPU usage:
top or htop
5️⃣ Check logs:
tail -f /var/log/syslog
6️⃣ Check network connections:
netstat -tulpn
7️⃣ Check running processes:
ps aux
8️⃣ Kill a process:
kill <pid>
9️⃣ Check file permissions:
ls -l
🔟 Change file permissions:
chmod <permissions> <file>
1️⃣ List running containers:
docker ps
2️⃣ Start a container:
docker start <container_name>
3️⃣ Stop a container:
docker stop <container_name>
4️⃣ Remove a container:
docker rm <container_name>
5️⃣ List all containers:
docker ps -a
6️⃣ Pull an image:
docker pull <image_name>
7️⃣ Run a container:
docker run -d <image_name>
8️⃣ Exec into a container:
docker exec -it <container_name> /bin/bash
9️⃣ Check container logs:
docker logs <container_name>
🔟 Build a Docker image:
docker build -t <image_name> .
1️⃣ Get nodes:
kubectl get nodes
2️⃣ Get pods:
kubectl get pods
3️⃣ Get deployments:
kubectl get deployments
4️⃣ Get services:
kubectl get svc
5️⃣ Create a deployment:
kubectl create deployment <deployment_name> --image=<image_name>
6️⃣ Apply a configuration:
kubectl apply -f <config_file>
7️⃣ Get pod logs:
kubectl logs <pod_name>
8️⃣ Exec into a pod:
kubectl exec -it <pod_name> -- /bin/bash
9️⃣ Scale a deployment:
kubectl scale deployment <deployment_name> --replicas=<replica_count>
🔟 Delete a pod:
kubectl delete pod <pod_name>
1️⃣ Clone a repository:
git clone <repository_url>
2️⃣ Check repository status:
git status
3️⃣ Add changes:
git add <file_name>
4️⃣ Commit changes:
git commit -m "<commit_message>"
5️⃣ Push changes:
git push <remote_name> <branch_name>
6️⃣ Pull changes:
git pull <remote_name> <branch_name>
7️⃣ Check commit history:
git log
8️⃣ Create a new branch:
git branch <branch_name>
9️⃣ Switch to a branch:
git checkout <branch_name>
🔟 Merge a branch:
git merge <branch_name>
1️⃣ List EC2 instances:
aws ec2 describe-instances
2️⃣ Create an EC2 instance:
aws ec2 run-instances --image-id <image_id> --instance-type <instance_type>
3️⃣ Start an EC2 instance:
aws ec2 start-instances --instance-ids <instance_id>
📍 Save this post for quick reference!🔖 💬 Share with your DevOps community!
#DevOps #Linux #Docker #Kubernetes #Git #AWS #Cloud #Automation #ProDevOpsGuy
Please open Telegram to view this post
VIEW IN TELEGRAM