Basic Linux Commands for freshers.
- check first the history than the last log-ins, system uptime, last reboot,
# history; last ; uptime ; last reboot;
- Checking Linux General system info:
# uname -a;id;uptime;date;free -mtol;who;cat /proc/cpuinfo;echo $PATH;df -m; sysctl vm;
- Checking Linux General network configuration info
# ip addr show ; ip route show ; ip neigh show; ip rule list; head /etc/resolv.confThis will show the ip address of the interfaces, the routes, the arp cache , list the routing table rules and our DNS’s.
- Monitor the RAM usage of all processes :
ps -eo pid,ppid,rss,vsize,pcpu,pmem,cmd -ww --sort=pid
- Other Specific health checks
df -i; cat /proc/mdstats;df -i checking Inodes state, and /proc/mdstats if we have RAID on the box.
- Check for big files and where are the most files on the system:
find . -type f -size +30000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
-- (check for files more then 30000kb)
- Check the logs if there are any warnings or fatal errors, and other important logs.
zcat messages-* | grep -i warning | less zcat messages-* | grep -i fatal | less dmesg | less
- Check full system configuration
sysctl -a
