---Linux for devOps maintain---
This guide covers essential Linux commands for DevOps, including file management, permissions, networking, process control, logs, and automation. Useful for CI/CD, Cloud, Containers, and Production servers.
pwd
ls
ls -la
cd /path
mkdir project
rm file.txt
rm -rf folder
cp file1 file2
mv old new
touch file.txtcat file.txt
less file.txt
more file.txt
head file.txt
tail file.txt
tail -f app.logFind file
find / -name file.txtSearch inside file
grep "error" file.txtSearch recursively
grep -r "error" .Search running process
ps aux | grep nginxCheck permissions
ls -lChange permission
chmod 777 file.txt
chmod +x script.shChange ownership
chown user:user file.txtShow running processes
ps auxReal time process monitor
topKill process
kill PID
kill -9 PIDFind process
pgrep nginxCheck IP
ip aPing server
ping google.comCheck open ports
netstat -tulnpCheck port usage
lsof -i :8080Test API
curl http://localhost:3000Download file
wget https://example.com/file.zipUbuntu / Debian
apt update
apt upgrade
apt install nginxCentOS / RHEL
yum install nginxCheck disk
df -hCheck folder size
du -sh *Check memory
free -mSystem logs
/var/log/syslogView logs
tail -f /var/log/syslogDocker logs
docker logs containerNginx logs
/var/log/nginx/access.logCreate user
useradd devopsSwitch user
su devopsSudo command
sudo apt updateStart service
systemctl start nginxStop service
systemctl stop nginxRestart service
systemctl restart nginxCheck status
systemctl status nginxEnable on boot
systemctl enable nginxZip
zip file.zip file.txtUnzip
unzip file.zipTar
tar -cvf file.tar folderExtract
tar -xvf file.tarEnvironment variables
export ENV=production
echo $ENVRun script
bash deploy.shMake executable
chmod +x deploy.sh
./deploy.shls
cd
pwd
chmod
chown
grep
find
top
kill
ps
df -h
du -sh
free -m
curl
wget
systemctl
tail -f
- Server deployment
- CI/CD pipelines
- Log monitoring
- Docker & Kubernetes management
- Cloud instance setup
- Automation scripts
- Production debugging
Connect to Server (SSH)
↓
Pull Code (Git)
↓
Install Dependencies
↓
Build Application
↓
Restart Service
↓
Monitor Logs