linux-fundamentals-skill
Complete Linux administration skill covering process management, filesystem, permissions, package management, users, bash scripting, and system monitoring.
When & Why to Use This Skill
This Claude skill provides a comprehensive suite of Linux administration capabilities, serving as a foundational tool for DevOps and system engineering. It automates core tasks including process management, filesystem operations, user permissions, and package handling across multiple distributions like Ubuntu, CentOS, and Debian. By integrating system monitoring and bash scripting, it empowers users to maintain system health, troubleshoot performance bottlenecks, and streamline IT workflows efficiently.
Use Cases
- System Health Monitoring: Utilizing the 'monitor' operation to track CPU, memory, and disk usage in real-time to prevent system downtime.
- Automated Environment Provisioning: Streamlining the setup of new server instances by automating package installations and user account configurations.
- Security Hardening: Managing complex file permissions and ownership (chmod/chown/ACLs) to ensure data integrity and meet compliance standards.
- Incident Response & Troubleshooting: Rapidly identifying and terminating resource-heavy processes or resolving 'disk full' errors using built-in recovery procedures.
- DevOps Workflow Automation: Creating and managing bash scripts to automate repetitive administrative tasks and improve overall operational efficiency.
| name | linux-fundamentals-skill |
|---|---|
| description | Complete Linux administration skill covering process management, filesystem, permissions, package management, users, bash scripting, and system monitoring. |
| sasmp_version | "1.3.0" |
| bonded_agent | 01-devops-fundamentals |
| bond_type | PRIMARY_BOND |
| - name | operation |
| type | string |
| required | true |
| default | "ubuntu" |
| validation | "^(ubuntu|debian|centos|rhel|fedora|arch)$" |
| enum | ["process", "filesystem", "permissions", "package", "user", "script", "monitor"] |
| strategy | exponential_backoff |
| initial_delay_ms | 1000 |
| max_retries | 3 |
| logging | structured |
| metrics | enabled |
Linux Fundamentals Skill
Overview
Master Linux system administration - the foundation of DevOps.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| distro | string | No | ubuntu | Target distribution |
| operation | string | Yes | - | Operation category |
Core Topics
MANDATORY
- Process lifecycle and management (ps, top, kill)
- Filesystem hierarchy and operations
- File permissions (chmod, chown, ACLs)
- Package management (apt, yum, dnf)
- User and group administration
- Basic bash scripting
OPTIONAL
- LVM and disk partitioning
- Systemd service management
- Log analysis with journalctl
ADVANCED
- Kernel parameters and sysctl
- SELinux/AppArmor security
- Performance profiling
Quick Reference
# Process Management
ps aux | grep [p]rocess # Find process (avoid grep itself)
kill -15 PID # Graceful termination
kill -9 PID # Force kill (last resort)
pkill -f pattern # Kill by pattern
nohup command & # Background immune to hangup
# File Permissions
chmod 755 file # rwxr-xr-x
chmod u+x,g+r file # Symbolic notation
chown -R user:group dir/ # Recursive ownership
setfacl -m u:user:rw file # Set ACL
# Package Management (Debian/Ubuntu)
apt update && apt upgrade -y
apt install -y package
apt autoremove
# Package Management (RHEL/CentOS)
dnf update -y
dnf install package
# User Management
useradd -m -s /bin/bash user
usermod -aG sudo user
passwd user
# System Info
uname -a # Kernel info
cat /etc/os-release # OS version
free -h # Memory usage
df -h # Disk usage
Troubleshooting
Common Failures
| Symptom | Root Cause | Solution |
|---|---|---|
| Permission denied | Insufficient privileges | Use sudo or check ownership |
| Command not found | Package not installed | Install with apt/dnf |
| No space left | Disk full | Clean /var/log, docker prune |
| High load | CPU/IO bottleneck | Use top, iotop |
Debug Checklist
- Check permissions:
id,ls -la - Check disk:
df -h,du -sh /* - Check memory:
free -h - Check logs:
journalctl -xe
Recovery Procedures
Out of Disk Space
- Find large files:
du -sh /* | sort -rh | head - Clean cache:
apt clean - Rotate logs:
journalctl --vacuum-size=100M