admin-wsl
WSL2 Ubuntu administration from Linux side. Profile-aware - reads preferences from Windows-side profile at /mnt/c/Users/{WIN_USER}/.admin/profiles/{hostname}.json Use when: Inside WSL for apt packages, Docker, Python/uv, shell configs, systemd. Coordinates with admin-windows via shared profile ON THE WINDOWS SIDE.
Best use case
admin-wsl is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
WSL2 Ubuntu administration from Linux side. Profile-aware - reads preferences from Windows-side profile at /mnt/c/Users/{WIN_USER}/.admin/profiles/{hostname}.json Use when: Inside WSL for apt packages, Docker, Python/uv, shell configs, systemd. Coordinates with admin-windows via shared profile ON THE WINDOWS SIDE.
Teams using admin-wsl should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/admin-wsl/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How admin-wsl Compares
| Feature / Agent | admin-wsl | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
WSL2 Ubuntu administration from Linux side. Profile-aware - reads preferences from Windows-side profile at /mnt/c/Users/{WIN_USER}/.admin/profiles/{hostname}.json Use when: Inside WSL for apt packages, Docker, Python/uv, shell configs, systemd. Coordinates with admin-windows via shared profile ON THE WINDOWS SIDE.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# WSL Administration
**Requires**: WSL2 context, Ubuntu 24.04
---
## ⚠️ Critical: Profile Location
**The profile lives on the WINDOWS side, not in WSL home.**
```bash
# WRONG - this doesn't exist in WSL
ls ~/.admin/profiles/ # Empty!
# RIGHT - profile is on Windows, accessed via /mnt/c
WIN_USER=$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r')
ADMIN_ROOT="/mnt/c/Users/$WIN_USER/.admin"
PROFILE_PATH="$ADMIN_ROOT/profiles/$(hostname).json"
ls "$PROFILE_PATH" # Found!
```
---
## Quick Start
The loader auto-detects WSL and uses the correct path:
```bash
source /path/to/admin/scripts/load-profile.sh
show_environment # Verify detection
load_admin_profile
show_admin_summary
```
Output should show:
```
Type: WSL (Windows Subsystem for Linux)
Win User: {your-windows-username}
ADMIN_ROOT: /mnt/c/Users/{username}/.admin
Profile: /mnt/c/Users/{username}/.admin/profiles/{hostname}.json
Exists: YES
```
---
## Check WSL Config from Profile
```bash
# Profile has WSL section
jq '.wsl' "$PROFILE_PATH"
# Resource limits
jq '.wsl.resourceLimits' "$PROFILE_PATH"
# Returns: {"memory": "16GB", "processors": 8, "swap": "4GB"}
# WSL tools
jq '.wsl.distributions["Ubuntu-24.04"].tools' "$PROFILE_PATH"
```
---
## Package Installation (Profile-Aware)
### Python - Check Preference
```bash
PY_MGR=$(jq -r '.preferences.python.manager' "$PROFILE_PATH")
# Returns: "uv" or "pip" or "conda"
case "$PY_MGR" in
uv) uv pip install "$package" ;;
pip) pip install "$package" ;;
conda) conda install "$package" ;;
esac
```
### Node - Check Preference
```bash
NODE_MGR=$(jq -r '.preferences.node.manager' "$PROFILE_PATH")
case "$NODE_MGR" in
npm) npm install "$package" ;;
pnpm) pnpm add "$package" ;;
yarn) yarn add "$package" ;;
bun) bun add "$package" ;;
esac
```
### System Packages (apt)
```bash
sudo apt update
sudo apt install -y $package
```
---
## Docker Operations
### Check Docker from Profile
```bash
DOCKER_PRESENT=$(jq -r '.docker.present' "$PROFILE_PATH")
DOCKER_BACKEND=$(jq -r '.docker.backend' "$PROFILE_PATH")
if [[ "$DOCKER_PRESENT" == "true" && "$DOCKER_BACKEND" == "WSL2" ]]; then
# Docker Desktop with WSL2 integration
docker ps
fi
```
### Common Commands
```bash
docker ps # List running
docker images # List images
docker logs <container> # View logs
docker exec -it <c> bash # Shell into container
docker-compose up -d # Start compose stack
```
---
## Path Conversions
Windows paths in profile need conversion:
```bash
# Profile path: "C:/Users/Owner/.ssh"
# WSL path: "/mnt/c/Users/Owner/.ssh"
win_to_wsl() {
local win_path="$1"
local drive=$(echo "$win_path" | cut -c1 | tr '[:upper:]' '[:lower:]')
local rest=$(echo "$win_path" | cut -c3- | sed 's|\\|/|g')
echo "/mnt/$drive$rest"
}
# Usage
SSH_PATH=$(jq -r '.paths.sshKeys' "$PROFILE_PATH")
WSL_SSH_PATH=$(win_to_wsl "$SSH_PATH")
```
---
## SSH to Servers
Use profile server data:
```bash
# Get server info
SERVER=$(jq '.servers[] | select(.id == "cool-two")' "$PROFILE_PATH")
HOST=$(echo "$SERVER" | jq -r '.host')
USER=$(echo "$SERVER" | jq -r '.username')
KEY=$(echo "$SERVER" | jq -r '.keyPath')
# Convert Windows key path
WSL_KEY=$(win_to_wsl "$KEY")
# Connect
ssh -i "$WSL_KEY" "$USER@$HOST"
```
Or use the loader helper:
```bash
source load-profile.sh
load_admin_profile
ssh_to_server "cool-two" # Auto-converts paths
```
---
## Update Profile from WSL
After installing a tool in WSL:
```bash
# Read profile
PROFILE=$(cat "$PROFILE_PATH")
# Update WSL tools section
PROFILE=$(echo "$PROFILE" | jq --arg ver "$(node --version)" \
'.wsl.distributions["Ubuntu-24.04"].tools.node.version = $ver')
# Save
echo "$PROFILE" | jq . > "$PROFILE_PATH"
```
---
## Resource Limits
Controlled by `.wslconfig` (Windows side). Profile tracks current settings:
```bash
jq '.wsl.resourceLimits' "$PROFILE_PATH"
```
To change, hand off to `admin-windows`:
```bash
# Log handoff
echo "[$(date -Iseconds)] HANDOFF: Need .wslconfig change - increase memory to 24GB" \
>> "$ADMIN_ROOT/logs/handoffs.log"
```
---
## Capabilities Check
```bash
# From profile
HAS_DOCKER=$(jq -r '.capabilities.hasDocker' "$PROFILE_PATH")
HAS_GIT=$(jq -r '.capabilities.hasGit' "$PROFILE_PATH")
if [[ "$HAS_DOCKER" == "true" ]]; then
docker info
fi
```
---
## Issues Tracking
Check known issues before troubleshooting:
```bash
jq '.issues.current[]' "$PROFILE_PATH"
```
Add new issue:
```bash
PROFILE=$(cat "$PROFILE_PATH")
PROFILE=$(echo "$PROFILE" | jq '.issues.current += [{
"id": "wsl-docker-'"$(date +%s)"'",
"tool": "docker",
"issue": "Docker socket not found",
"priority": "high",
"status": "pending",
"created": "'"$(date -Iseconds)"'"
}]')
echo "$PROFILE" | jq . > "$PROFILE_PATH"
```
---
## Common Tasks
### Update System
```bash
sudo apt update && sudo apt upgrade -y
```
### Install Python Package (Profile-Aware)
```bash
PY_MGR=$(get_preferred_manager python)
case "$PY_MGR" in
uv) uv pip install requests ;;
*) pip install requests ;;
esac
```
### Create Python Venv
```bash
PY_MGR=$(get_preferred_manager python)
if [[ "$PY_MGR" == "uv" ]]; then
uv venv .venv
source .venv/bin/activate
uv pip install -r requirements.txt
else
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
fi
```
---
## Scope Boundaries
| Task | Handle Here | Hand Off To |
|------|-------------|-------------|
| apt packages | ✅ | - |
| Docker containers | ✅ | - |
| Python/Node in WSL | ✅ | - |
| .bashrc/.zshrc | ✅ | - |
| systemd services | ✅ | - |
| .wslconfig | ❌ | admin-windows |
| Windows packages | ❌ | admin-windows |
| MCP servers | ❌ | admin-mcp |
| Native Linux (non-WSL) | ❌ | admin-unix |
---
## References
- `references/OPERATIONS.md` - Troubleshooting, known issuesRelated Skills
administration
How to monitor usage, track costs, configure analytics, and measure ROI for Claude Code. Use when user asks about monitoring, telemetry, metrics, costs, analytics, or OpenTelemetry.
administering-linux
Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying applications, optimizing server performance, diagnosing production issues, or managing users and security on Linux servers.
admin
Admin panel - RBAC, config, admin tools. Use when building admin UI.
admin-windows
Windows system administration with PowerShell 7.x. Profile-aware - reads your preferences for package managers (scoop vs winget), paths, and installed tools. Use when: Windows-specific admin tasks, PowerShell automation, PATH configuration, package installation, bash-to-PowerShell translation.
admin-unix
Native macOS and Linux administration (non-WSL). Profile-aware - reads preferences from ~/.admin/profiles/{hostname}.json. Use when: macOS/Linux system admin, Homebrew (macOS), apt (Linux), services. NOT for WSL - use admin-wsl instead.
admin-panel-builder
Expert assistant for creating and maintaining admin panel pages in the KR92 Bible Voice project. Use when creating admin pages, building admin components, integrating with admin navigation, or adding admin features.
admin-mcp
MCP server management for Claude Desktop. Profile-aware - reads MCP server inventory from profile.mcp.servers{} and config path from profile.paths.claudeConfig. Use when: installing MCP servers, configuring Claude Desktop, troubleshooting MCP issues.
admin-interface-rules
Rules for the Admin interface functionalities
admin-infra-vultr
Deploys infrastructure on Vultr with Cloud Compute instances, High-Frequency servers, and VPCs. Excellent value with Kubernetes autoscaling support and global data centers. Use when: setting up Vultr infrastructure, deploying cloud compute or high-frequency instances, configuring firewalls, needing good price/performance with global reach. Keywords: vultr, vultr-cli, VPS, cloud compute, high-frequency, firewall, VPC, kubernetes autoscale, infrastructure
admin-infra-oci
Deploys infrastructure on Oracle Cloud Infrastructure (OCI) with ARM64 instances (Always Free tier eligible). Handles compartments, VCNs, subnets, security lists, and compute instances. Use when: setting up Oracle Cloud infrastructure, deploying ARM64 instances, troubleshooting OUT_OF_HOST_CAPACITY errors, optimizing for Always Free tier. Keywords: oracle cloud, OCI, ARM64, VM.Standard.A1.Flex, Always Free tier, OUT_OF_HOST_CAPACITY, oci compartment, oci vcn
admin-infra-linode
Deploys infrastructure on Linode (Akamai Cloud) with Linodes, Firewalls, and VLANs. Strong Kubernetes support with Cluster Autoscaler and Akamai edge network integration. Use when: setting up Linode/Akamai infrastructure, deploying Linodes, configuring firewalls, needing Kubernetes autoscaling, wanting Akamai CDN integration. Keywords: linode, akamai, linode-cli, VPS, dedicated CPU, firewall, VLAN, kubernetes autoscale, infrastructure
admin-infra-hetzner
Deploys infrastructure on Hetzner Cloud with ARM64 or x86 servers. Cost-effective European cloud with excellent price/performance ratio. Use when: setting up Hetzner Cloud infrastructure, deploying ARM64 servers (CAX), x86 servers (CX/CPX), looking for affordable alternative to OCI. Keywords: hetzner, hcloud, ARM64, CAX, CX, CPX, infrastructure, server setup, european cloud