Skip to content

Lesson 13 — Linux Administration & Troubleshooting

Lesson 13 — Linux Administration & Troubleshooting

Section titled “Lesson 13 — Linux Administration & Troubleshooting”

In a production environment, Linux administrators rarely spend all day installing software or creating users.

Instead, much of their time is spent solving problems.

Imagine receiving alerts like these:

  • Website is down
  • Server is running slowly
  • Users cannot log in
  • Disk space is full
  • Application won’t start
  • Database connection failed
  • SSH is unreachable

Every organization expects its Linux administrators to quickly identify the root cause and restore services.

Troubleshooting is one of the most valuable skills in Cloud Engineering, DevOps, Site Reliability Engineering (SRE), and Cybersecurity.

This lesson teaches a structured methodology for diagnosing and resolving Linux issues in enterprise environments.


After completing this lesson, you will be able to:

  • Follow a structured troubleshooting methodology.
  • Monitor CPU, memory, storage, and networking.
  • Analyze Linux logs.
  • Troubleshoot services.
  • Diagnose performance issues.
  • Investigate common Linux problems.
  • Apply enterprise troubleshooting best practices.

Troubleshooting is the process of:

  • Identifying problems
  • Finding the root cause
  • Resolving the issue
  • Verifying the solution
  • Preventing recurrence

A structured approach reduces downtime and improves system reliability.


Successful administrators follow a consistent process.

Problem Report
Collect Information
Identify Symptoms
Analyze Logs
Determine Root Cause
Implement Fix
Verify Resolution
Document Findings

Never jump directly to conclusions without gathering evidence.


Before making changes, collect information.

Questions to ask:

  • What changed?
  • When did the issue begin?
  • Is the issue affecting everyone?
  • Which application is impacted?
  • Are there any recent deployments?
  • Are there recent configuration changes?

Understanding the scope helps narrow the investigation.


View system uptime.

Terminal window
uptime

Example:

15:42:21 up 42 days
load average: 0.25, 0.30, 0.35

This provides:

  • Uptime
  • Logged-in users
  • System load

Monitor running processes.

Terminal window
top

or

Terminal window
htop

Look for:

  • High CPU usage
  • Stuck processes
  • Zombie processes
  • Excessive load

Display memory statistics.

Terminal window
free -h

Example:

Total
Used
Free
Available

Low available memory may cause slow performance or swapping.


Display storage usage.

Terminal window
df -h

Example:

Filesystem
Use%
95%

If a partition reaches 100%, applications may fail.


Find directories consuming space.

Terminal window
du -sh /*

Example:

Terminal window
du -sh /var/log

Useful for locating oversized log files or backups.


Verify service status.

Terminal window
systemctl status nginx

Example:

Active:
running

If inactive, investigate why the service stopped.


Restart the service.

Terminal window
sudo systemctl restart nginx

Then verify its status.

Terminal window
systemctl status nginx

Most Linux problems leave evidence in log files.

System logs:

Terminal window
journalctl

Authentication logs:

Ubuntu

/var/log/auth.log

Red Hat

/var/log/secure

Application logs:

/var/log/nginx/
/var/log/apache2/
/var/log/mysql/

Logs are often the fastest way to identify the root cause.


Display recent logs.

Terminal window
journalctl -xe

View logs for a service.

Terminal window
journalctl -u nginx

Verify IP configuration.

Terminal window
ip addr

Check routing.

Terminal window
ip route

Test connectivity.

Terminal window
ping google.com

Verify DNS.

Terminal window
dig google.com

Many application issues are caused by network or DNS problems.


Display listening services.

Terminal window
ss -tuln

Example:

22
SSH
443
HTTPS

If the expected port is missing, the service may not be running.


Locate a process.

Terminal window
ps -ef | grep nginx

Display process tree.

Terminal window
pstree

Terminate a hung process if necessary.

Terminal window
kill PID

Check logged-in users.

Terminal window
who

View login history.

Terminal window
last

Check failed logins.

Terminal window
lastb

These commands help identify authentication problems.


Display permissions.

Terminal window
ls -l

Incorrect permissions frequently cause:

  • Application failures
  • Access denied errors
  • Service startup failures

View cron jobs.

Terminal window
crontab -l

System-wide cron configuration.

Terminal window
cat /etc/crontab

Automation failures often originate from scheduled tasks.


View boot performance.

Terminal window
systemd-analyze

View failed services.

Terminal window
systemctl --failed

Review boot logs.

Terminal window
journalctl -b

These commands help diagnose startup failures.


Possible causes:

  • Infinite loops
  • Heavy applications
  • Malware
  • Resource-intensive processes

Commands:

Terminal window
top
htop

Possible causes:

  • Memory leaks
  • Large applications
  • Insufficient RAM

Commands:

Terminal window
free -h
top

Symptoms:

  • Unable to save files
  • Database failures
  • Log write failures

Commands:

Terminal window
df -h
du -sh

Check:

  • Logs
  • Configuration
  • Port conflicts
  • Permissions

Commands:

Terminal window
systemctl status
journalctl

Check:

  • Interface
  • Gateway
  • DNS
  • Firewall
  • Routing

Commands:

Terminal window
ip
ping
dig
ss

Verify:

  • SSH service
  • Firewall
  • Network connectivity
  • Port 22

Commands:

Terminal window
systemctl status ssh
ss -tuln

Cloud Engineers frequently investigate:

  • EC2 startup failures
  • High CPU utilization
  • Full EBS volumes
  • Security Group issues
  • Route table problems
  • DNS resolution failures
  • Load balancer health checks

Linux troubleshooting skills directly translate to cloud environments.


Common investigations include:

  • Pods stuck in Pending
  • CrashLoopBackOff
  • Node Not Ready
  • Image Pull Errors
  • DNS failures
  • Storage mount issues

Linux logs and networking knowledge are essential when troubleshooting Kubernetes clusters.


Security teams investigate:

  • Failed logins
  • Unauthorized processes
  • Suspicious network connections
  • Privilege escalation attempts
  • Malware activity
  • Log anomalies

Many incident response investigations begin with Linux system analysis.


Display system uptime:

Terminal window
uptime

Monitor processes:

Terminal window
top

Memory usage:

Terminal window
free -h

Disk usage:

Terminal window
df -h

Directory size:

Terminal window
du -sh

View logs:

Terminal window
journalctl

Service status:

Terminal window
systemctl status

Running processes:

Terminal window
ps -ef

Open ports:

Terminal window
ss -tuln

Network configuration:

Terminal window
ip addr

A company’s website becomes unavailable.

The Linux administrator follows this workflow:

Website Down
Ping Server
SSH Login
Check CPU & Memory
Verify Disk Space
Check NGINX Status
Review NGINX Logs
Restart Service
Verify Website
Document Root Cause

Following a structured methodology reduces downtime and improves incident response.


As a Linux administrator:

  • Follow a structured troubleshooting process.
  • Never assume the root cause.
  • Collect evidence before making changes.
  • Review logs before restarting services.
  • Monitor CPU, memory, storage, and networking regularly.
  • Document incidents and resolutions.
  • Test changes in a lab before production.
  • Automate health checks where possible.

A disciplined troubleshooting approach leads to faster resolution and more stable systems.


After completing this lesson, you should understand:

  • Enterprise troubleshooting methodology.
  • CPU, memory, and storage diagnostics.
  • Service troubleshooting.
  • Log analysis.
  • Network troubleshooting.
  • Common Linux issues.
  • Enterprise troubleshooting best practices.

Linux Administration & Troubleshooting is one of the most important operational skills in IT.

Whether you’re managing cloud infrastructure, supporting production applications, administering Kubernetes clusters, or responding to cybersecurity incidents, your ability to quickly identify and resolve issues directly impacts business operations.

By following a structured troubleshooting methodology and mastering Linux diagnostic tools, you’ll be prepared to manage enterprise Linux systems with confidence.


➡️ Lesson 14 — Enterprise Linux Administration

In the next lesson, you’ll learn how Linux is managed in large organizations, explore enterprise administration practices, automation, monitoring, patch management, compliance, documentation, and operational excellence used by professional Linux and cloud teams.