Complete Linux Services, Logs, Monitoring & Troubleshooting Commands
Complete Linux Services, Logs, Monitoring & Troubleshooting Commands — A Must-Have Guide for DevOps & Cloud Engineers
Whether you're managing production servers, working in DevOps, or handling mission-critical cloud infrastructure, mastering Linux commands is non-negotiable. This guide gives you a complete, practical, and production-ready command set covering services, logs, monitoring, and troubleshooting.
1. Linux Services Management (systemd)
Manage and control system services like a pro.
Essential Commands
Start a service
sudo systemctl start <service>
Stop a service
sudo systemctl stop <service>
Restart a service
sudo systemctl restart <service>
Enable service on boot
sudo systemctl enable <service>
Check service status
sudo systemctl status <service>
2. Log Management (journalctl & Log Files)
Logs are your first window into any issue.
Journalctl Examples
View full logs of a service
sudo journalctl -u <service>
View real-time logs
sudo journalctl -fu <service>
View logs from today
sudo journalctl --since "today"
Common Log File Locations
/var/log/syslog
/var/log/messages
/var/log/auth.log
/var/log/nginx/
3. Monitoring Commands (Performance Basics)
Monitor performance, resources, and system health.
CPU & Memory
Real-time system view
top
htop
Memory usage
free -h
Load average
uptime
Disk Monitoring
Check disk usage
df -h
Check folder sizes
du -sh *
Network Monitoring
Basic connectivity
ping <ip>
Active network connections
netstat -tulnp
ss -tulnp