Advanced Linux Command Line Techniques for System Administrators
Published on June 20, 2026
Linux is the backbone of modern IT infrastructure, powering cloud platform, containers, databases and enterprise applications.
While basic commands such as ls, cd and grep are commonly used, experience system administrators rely on advanced command line techniques to troubleshoot issues, optimize performance, automate tasks and maintain secure environments.
Find Large Files Consuming Disk Space
One of the most common production issues is a server running out of disk space.
find /opt -type f -size +500M
Find the top 10 largest files:
du -ah /opt | sort -rh | head -10
Use Case: Quickly identify log files, backups, or application dumps consuming excessive storage.
Monitor Real-Time Network Connections
Display active network connections:
ss -tulnp
Show established connections:
ss -ant | grep ESTAB
Use Case: Investigate suspicious connections or verify application ports.
Analyze Process Resource Consumption
Top CPU-consuming processes:
ps aux --sort=-%cpu | head
Top memory-consuming processes:
ps aux --sort=-%mem | head
Use Case: Identify applications causing performance degradation.
Search Logs Efficiently
Search for errors:
grep -i error /var/log/messages
Follow logs in real time:
tail -f /var/log/messages
Search compressed logs:
zgrep "ERROR" *.gz
Use Case: Troubleshoot production incidents without extracting archived logs.
Network Troubleshooting
Check routing path:
traceroute google.com
DNS lookup:
dig google.com
nslookup google.com
Check server connectivity:
nc -zv google.com 443
Use Case: Verify network paths and application accessibility.
Identify Listening Ports
netstat -tulpn
Modern alternative:
ss -tulpn
Use Case: Verify services are listening on expected ports.
Real-Time Process Monitoring
Active process viewer:
top
Monitor specific process:
top -p <PID>
Use Case: Track resource usage during application deployment or troubleshooting.
Advanced Text Processing
Extract specific fields:
awk '{print $1,$5}' file.txt
Count unique entries:
awk '{print $1}' access.log | sort | uniq -c | sort -nr
Use Case: Analyze web server logs and application outputs.
Find Recently Modified Files
find /var/log -mtime -1
Modified in last hour:
find / -mmin -60
Find configurations files:
find /etc -name "*.conf"
Use Case: Track configuration changes or newly generated files.
Find Zombie Processes
ps aux | awk '$8 ~ /^Z/'
Use Case: Detect orphaned or improperly terminated applications.
Performance Monitoring with vmstat
vmstat 1
Monitor:
- CPU usage
- Memory
- Swap
- I/O activity
Use Case: Quick health check during performance incidents.
Secure Remote Administration
Generate SSH key pair:
ssh-keygen -t rsa -b 4096
Copy public key:
ssh-copy-id user@server
Use Case: Implement secure password less authentication.
Check SSL Certificate Expiration
echo | openssl s_client -servername google.com -connect google.com:443 2>/dev/null | openssl x509 -noout -dates
Use Case: Quickly verify an SSL/TLS certificate's issue date and expiration date. This command is especially useful for monitoring production websites, load balancers, reverse proxies, and APIs to ensure certificates are valid and renewed before they expire.
Generate Random Password
openssl rand -base64 24
Use Case: Generate strong passwords, API keys, or secrets.
Watch Command Output Continuously
watch -n 2 "df -h"
Use Case: Refresh command output every few seconds without retyping.
Display Environment Variables
printenv
Specific variable:
printenv PATH
Use Case: Verify application environment variables.
Essential Linux Commands
# Show current public IP
curl ifconfig.me
# Check website response time
curl -o /dev/null -s -w "%{time_total}\n" https://kloudpages.com
# Count number of files
find . -type f | wc -l
# Tail multiple logs simultaneously
tail -f /var/log/messages /var/log/secure
# Decode Kubernetes Secrets, JWT payloads, or encoded configuration values
echo "SGVsbG8gV29ybGQ=" | base64 -d
echo "Hello World" | base64
# Check service status
systemctl status nginx