Skip to main content
ClaudeWave
Skill374 estrellas del repoactualizado 6mo ago

administering-linux

This Linux administration skill covers essential system management tasks for DevOps and backend engineers, including systemd service management, process monitoring, filesystem operations, user administration, networking configuration, and performance tuning on modern Linux distributions. Use it when deploying applications, diagnosing production issues, optimizing server performance, managing users and security, or troubleshooting service failures and system slowdowns.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/ancoleman/ai-design-components /tmp/administering-linux && cp -r /tmp/administering-linux/skills/administering-linux ~/.claude/skills/administering-linux
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Linux Administration

Comprehensive Linux system administration for managing servers, deploying applications, and troubleshooting production issues in modern cloud-native environments.

## Purpose

This skill teaches fundamental and intermediate Linux administration for DevOps engineers, SREs, backend developers, and platform engineers. Focus on systemd-based distributions (Ubuntu, RHEL, Debian, Fedora) covering service management, process monitoring, filesystem operations, user administration, performance tuning, log analysis, and network configuration.

Modern infrastructure requires solid Linux fundamentals even with containerization. Container hosts run Linux, Kubernetes nodes need optimization, and troubleshooting production issues requires understanding systemd, processes, and logs.

**Not Covered:**
- Advanced networking (BGP, OSPF) - see `network-architecture` skill
- Deep security hardening (compliance, pentesting) - see `security-hardening` skill
- Configuration management at scale (Ansible, Puppet) - see `configuration-management` skill
- Container orchestration - see `kubernetes-operations` skill

## When to Use This Skill

Use when deploying custom applications, troubleshooting slow systems, investigating service failures, optimizing workloads, managing users, configuring SSH, monitoring disk space, scheduling tasks, diagnosing network issues, or applying performance tuning.

## Quick Start

### Essential Commands

**Service Management:**
```bash
systemctl start nginx              # Start service
systemctl stop nginx               # Stop service
systemctl restart nginx            # Restart service
systemctl status nginx             # Check status
systemctl enable nginx             # Enable at boot
journalctl -u nginx -f             # Follow service logs
```

**Process Monitoring:**
```bash
top                                # Interactive process monitor
htop                               # Enhanced process monitor
ps aux | grep process_name         # Find specific process
kill -15 PID                       # Graceful shutdown (SIGTERM)
kill -9 PID                        # Force kill (SIGKILL)
```

**Disk Usage:**
```bash
df -h                              # Filesystem usage
du -sh /path/to/dir                # Directory size
ncdu /path                         # Interactive disk analyzer
```

**Log Analysis:**
```bash
journalctl -f                      # Follow all logs
journalctl -u service -f           # Follow service logs
journalctl --since "1 hour ago"    # Filter by time
journalctl -p err                  # Show errors only
```

**User Management:**
```bash
useradd -m -s /bin/bash username   # Create user with home dir
passwd username                    # Set password
usermod -aG sudo username          # Add to sudo group
userdel -r username                # Delete user and home dir
```

## Core Concepts

### Systemd Architecture

Systemd is the standard init system and service manager. Systemd units define services, timers, targets, and other system resources.

**Unit File Locations (priority order):**
- `/etc/systemd/system/` - Custom units (highest priority)
- `/run/systemd/system/` - Runtime units (transient)
- `/lib/systemd/system/` - System-provided units (don't modify)

**Key Unit Types:** `.service` (services), `.timer` (scheduled tasks), `.target` (unit groups), `.socket` (socket-activated)

**Essential systemctl Commands:**
```bash
systemctl daemon-reload            # Reload unit files after changes
systemctl list-units --type=service
systemctl list-timers              # Show all timers
systemctl cat nginx.service        # Show unit file content
systemctl edit nginx.service       # Create override file
```

For detailed systemd reference, see `references/systemd-guide.md`.

### Process Management

Processes are running programs with unique PIDs. Understanding process states, signals, and resource usage is essential for troubleshooting.

**Process States:** R (running), S (sleeping), D (uninterruptible sleep/I/O), Z (zombie), T (stopped)

**Common Signals:** SIGTERM (15) graceful, SIGKILL (9) force, SIGHUP (1) reload config

**Process Priority:**
```bash
nice -n 10 command                 # Start with lower priority
renice -n 5 -p PID                 # Change priority of running process
```

### Filesystem Hierarchy

Essential directories: `/` (root), `/etc/` (config), `/var/` (variable data), `/opt/` (optional software), `/usr/` (user programs), `/home/` (user directories), `/tmp/` (temporary), `/boot/` (boot loader)

**Filesystem Types Quick Reference:**
- **ext4** - General purpose (default)
- **XFS** - Large files, databases (RHEL default)
- **Btrfs** - Snapshots, copy-on-write
- **ZFS** - Enterprise, data integrity, NAS

For filesystem management details including LVM and RAID, see `references/filesystem-management.md`.

### Package Management

**Ubuntu/Debian (apt):**
```bash
apt update && apt upgrade          # Update system
apt install package                # Install package
apt remove package                 # Remove package
apt search keyword                 # Search packages
```

**RHEL/CentOS/Fedora (dnf):**
```bash
dnf update                         # Update all packages
dnf install package                # Install package
dnf remove package                 # Remove package
dnf search keyword                 # Search packages
```

Use native package managers for system services; snap/flatpak for desktop apps and cross-distro compatibility.

## Decision Frameworks

### Troubleshooting Performance Issues

**Investigation Workflow:**

1. **Identify bottleneck:**
   ```bash
   top                             # Quick overview
   uptime                          # Load averages
   ```

2. **CPU Issues (usage >80%):**
   ```bash
   top                             # Press Shift+P to sort by CPU
   ps aux --sort=-%cpu | head
   ```

3. **Memory Issues (swap used):**
   ```bash
   free -h                         # Memory usage
   top
ai-data-engineeringSkill

Data pipelines, feature stores, and embedding generation for AI/ML systems. Use when building RAG pipelines, ML feature serving, or data transformations. Covers feature stores (Feast, Tecton), embedding pipelines, chunking strategies, orchestration (Dagster, Prefect, Airflow), dbt transformations, data versioning (LakeFS), and experiment tracking (MLflow, W&B).

architecting-dataSkill

Strategic guidance for designing modern data platforms, covering storage paradigms (data lake, warehouse, lakehouse), modeling approaches (dimensional, normalized, data vault, wide tables), data mesh principles, and medallion architecture patterns. Use when architecting data platforms, choosing between centralized vs decentralized patterns, selecting table formats (Iceberg, Delta Lake), or designing data governance frameworks.

architecting-networksSkill

Design cloud network architectures with VPC patterns, subnet strategies, zero trust principles, and hybrid connectivity. Use when planning VPC topology, implementing multi-cloud networking, or establishing secure network segmentation for cloud workloads.

architecting-securitySkill

Design comprehensive security architectures using defense-in-depth, zero trust principles, threat modeling (STRIDE, PASTA), and control frameworks (NIST CSF, CIS Controls, ISO 27001). Use when designing security for new systems, auditing existing architectures, or establishing security governance programs.

assembling-componentsSkill

Assembles component outputs from AI Design Components skills into unified, production-ready component systems with validated token integration, proper import chains, and framework-specific scaffolding. Use as the capstone skill after running theming, layout, dashboard, data-viz, or feedback skills to wire components into working React/Next.js, Python, or Rust projects.

building-ai-chatSkill

Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support. Use when creating ChatGPT-style interfaces, AI assistants, code copilots, or conversational agents. Handles streaming text, token limits, regeneration, feedback loops, tool usage visualization, and AI-specific error patterns. Provides battle-tested components from leading AI products with accessibility and performance built in.

building-ci-pipelinesSkill

Constructs secure, efficient CI/CD pipelines with supply chain security (SLSA), monorepo optimization, caching strategies, and parallelization patterns for GitHub Actions, GitLab CI, and Argo Workflows. Use when setting up automated testing, building, or deployment workflows.

building-clisSkill

Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap. Use when creating developer tools, automation scripts, or infrastructure management CLIs with robust argument parsing, interactive features, and multi-platform distribution.