{ "meta": { "version": "2.0", "title": "Linux 运维工程师成长路径", "author": "PMClaw", "updated": "2026-03-06", "description": "从新手到高手,系统学习 Linux 运维技能" }, "levels": [ { "id": "level_1_intro", "title": "🌱 Level 1: 入门篇 - 熟悉终端", "description": "掌握最基本的 5 个命令,快速上手 Linux 终端", "challenges": [ { "id": "pwd_1", "title": "我在哪?", "desc": "使用 pwd 命令查看你当前所在的目录", "hint": "直接输入 pwd 回车", "success_test": "output.strip() == '/'", "solution": ["pwd"], "success_msg": "🎉 恭喜你!你学会了第一个 Linux 命令!" }, { "id": "ls_1", "title": "看看周围", "desc": "使用 ls 命令列出 /sandbox 下的所有子目录和文件", "hint": "输入 ls /sandbox", "success_test": "'users' in output and 'projects' in output", "solution": ["ls /sandbox", "ls /"], "success_msg": "👀 很好!你能看到周围的文件了" }, { "id": "cd_1", "title": "进入用户区", "desc": "使用 cd 命令进入 /users 目录", "hint": "先 cd 进去,再用 pwd 确认", "success_test": "cwd == '/users'", "solution": ["cd /users"], "success_msg": "🚶 移动成功!你学会了在目录间穿梭" }, { "id": "cat_1", "title": "读取文件", "desc": "使用 cat 命令读取 /users/alice.txt 的内容", "hint": "cat /users/alice.txt", "success_test": "'Alice' in output and 'Linux' in output", "solution": ["cat /users/alice.txt"], "success_msg": "📖 阅读成功!文件内容已掌握" }, { "id": "echo_1", "title": "输出文字", "desc": "使用 echo 命令输出 'Hello Linux'", "hint": "echo Hello Linux", "success_test": "'Hello Linux' in output", "solution": ["echo Hello Linux"], "success_msg": "📢 声音洪亮!echo 命令已掌握" } ] }, { "id": "level_2_file", "title": "📁 Level 2: 文件操作 - 管理文件系统", "description": "学习创建、删除、复制、移动文件和目录", "challenges": [ { "id": "mkdir_1", "title": "创建目录", "desc": "在 /tmp 下创建一个名为 'mydir' 的目录", "hint": "mkdir /tmp/mydir", "success_test": "exists('/tmp/mydir')", "solution": ["mkdir /tmp/mydir"], "success_msg": "📂 目录创建成功!" }, { "id": "touch_1", "title": "创建文件", "desc": "在 /tmp/mydir 下创建一个名为 'test.txt' 的空文件", "hint": "touch /tmp/mydir/test.txt", "success_test": "exists('/tmp/mydir/test.txt')", "solution": ["touch /tmp/mydir/test.txt"], "success_msg": "📄 文件创建成功!" }, { "id": "cp_1", "title": "复制文件", "desc": "将 /users/alice.txt 复制到 /tmp/mydir/", "hint": "cp /users/alice.txt /tmp/mydir/", "success_test": "exists('/tmp/mydir/alice.txt')", "solution": ["cp /users/alice.txt /tmp/mydir/"], "success_msg": "📋 复制成功!文件已备份" }, { "id": "mv_1", "title": "移动文件", "desc": "将 /tmp/mydir/alice.txt 重命名为 bob.txt", "hint": "mv /tmp/mydir/alice.txt /tmp/mydir/bob.txt", "success_test": "exists('/tmp/mydir/bob.txt') and not exists('/tmp/mydir/alice.txt')", "solution": ["mv /tmp/mydir/alice.txt /tmp/mydir/bob.txt"], "success_msg": "🚚 移动成功!文件已改名" }, { "id": "rm_1", "title": "删除文件", "desc": "删除 /tmp/mydir/test.txt 文件", "hint": "rm /tmp/mydir/test.txt", "success_test": "not exists('/tmp/mydir/test.txt')", "solution": ["rm /tmp/mydir/test.txt"], "success_msg": "🗑️ 删除成功!文件已清理" }, { "id": "chmod_1", "title": "修改权限", "desc": "给 /tmp/mydir/bob.txt 添加可执行权限", "hint": "chmod +x /tmp/mydir/bob.txt", "success_test": "is_executable('/tmp/mydir/bob.txt')", "solution": ["chmod +x /tmp/mydir/bob.txt"], "success_msg": "🔐 权限修改成功!" } ] }, { "id": "level_3_text", "title": "🔍 Level 3: 文本处理 - 数据分析师", "description": "掌握 grep、sed、awk 等强大的文本处理工具", "challenges": [ { "id": "grep_1", "title": "搜索文本", "desc": "在 /var/log/syslog 中搜索包含 'error' 的行", "hint": "grep error /var/log/syslog", "success_test": "'error' in output.lower()", "solution": ["grep error /var/log/syslog", "grep -i error /var/log/syslog"], "success_msg": "🎯 搜索成功!找到了错误日志" }, { "id": "head_1", "title": "查看开头", "desc": "查看 /var/log/syslog 的前 5 行", "hint": "head -n 5 /var/log/syslog", "success_test": "len(output.split('\\n')) >= 5", "solution": ["head -5 /var/log/syslog", "head -n 5 /var/log/syslog"], "success_msg": "👀 看到了开头!" }, { "id": "tail_1", "title": "查看结尾", "desc": "查看 /var/log/syslog 的最后 3 行", "hint": "tail -n 3 /var/log/syslog", "success_test": "len(output.split('\\n')) >= 3", "solution": ["tail -3 /var/log/syslog", "tail -n 3 /var/log/syslog"], "success_msg": "🔚 看到了结尾!" }, { "id": "wc_1", "title": "统计行数", "desc": "统计 /var/log/syslog 有多少行", "hint": "wc -l /var/log/syslog", "success_test": "output.strip().isdigit() or ' ' in output", "solution": ["wc -l /var/log/syslog"], "success_msg": "🔢 统计完成!" }, { "id": "find_1", "title": "查找文件", "desc": "在 /sandbox 下查找所有 .txt 文件", "hint": "find /sandbox -name '*.txt'", "success_test": "'.txt' in output", "solution": ["find /sandbox -name '*.txt'"], "success_msg": "🔍 查找成功!" } ] }, { "id": "level_4_system", "title": "⚙️ Level 4: 系统管理 - 运维工程师", "description": "学习进程管理、磁盘监控、系统服务控制", "challenges": [ { "id": "ps_1", "title": "查看进程", "desc": "查看当前运行的所有进程", "hint": "ps aux", "success_test": "'PID' in output and 'COMMAND' in output", "solution": ["ps aux", "ps -ef"], "success_msg": "👥 进程列表已显示!" }, { "id": "df_1", "title": "磁盘空间", "desc": "查看磁盘使用情况", "hint": "df -h", "success_test": "'Filesystem' in output and 'Size' in output", "solution": ["df -h"], "success_msg": "💾 磁盘信息已获取!" }, { "id": "du_1", "title": "目录大小", "desc": "查看 /sandbox 目录的总大小", "hint": "du -sh /sandbox", "success_test": "'sandbox' in output or 'M' in output or 'K' in output", "solution": ["du -sh /sandbox"], "success_msg": "📊 大小统计完成!" }, { "id": "free_1", "title": "内存使用", "desc": "查看内存使用情况", "hint": "free -h", "success_test": "'Mem' in output and 'total' in output.lower()", "solution": ["free -h"], "success_msg": "🧠 内存信息已获取!" }, { "id": "uptime_1", "title": "系统运行时间", "desc": "查看系统已运行多久", "hint": "uptime", "success_test": "'load average' in output.lower() or 'day' in output or 'up' in output.lower()", "solution": ["uptime"], "success_msg": "⏱️ 运行时间已显示!" } ] }, { "id": "level_5_network", "title": "🌐 Level 5: 网络运维 - 网络管理员", "description": "掌握网络诊断、连接监控、服务配置", "challenges": [ { "id": "ping_1", "title": "测试连通性", "desc": "ping 127.0.0.1 测试本地网络", "hint": "ping -c 3 127.0.0.1", "success_test": "'127.0.0.1' in output or 'bytes' in output or 'icmp' in output.lower()", "solution": ["ping -c 3 127.0.0.1"], "success_msg": "📡 网络连通!" }, { "id": "netstat_1", "title": "查看端口", "desc": "查看所有监听的端口", "hint": "netstat -tlnp", "success_test": "'LISTEN' in output or 'tcp' in output.lower()", "solution": ["netstat -tlnp", "ss -tlnp"], "success_msg": "🔌 端口列表已显示!" }, { "id": "curl_1", "title": "HTTP 请求", "desc": "使用 curl 访问 http://localhost:8080", "hint": "curl http://localhost:8080", "success_test": "'html' in output.lower() or 'http' in output.lower() or len(output) > 10", "solution": ["curl http://localhost:8080", "curl -I http://localhost:8080"], "success_msg": "🌐 HTTP 请求成功!" }, { "id": "ifconfig_1", "title": "查看网卡", "desc": "查看网络接口配置", "hint": "ifconfig 或 ip addr", "success_test": "'inet' in output or 'eth0' in output or 'lo' in output", "solution": ["ifconfig", "ip addr"], "success_msg": "🎴 网卡信息已获取!" } ] }, { "id": "level_6_advanced", "title": "🚀 Level 6: 高级运维 - 架构师", "description": "Shell 脚本、日志分析、性能优化", "challenges": [ { "id": "pipe_1", "title": "管道操作", "desc": "使用管道 | 将 ps aux 的输出传给 grep 搜索 ssh", "hint": "ps aux | grep ssh", "success_test": "'|' in cmd and ('ssh' in output or 'grep' in output)", "solution": ["ps aux | grep ssh"], "success_msg": "🔀 管道操作成功!" }, { "id": "redirect_1", "title": "重定向输出", "desc": "将 echo 'test' 的输出重定向到 /tmp/test.txt", "hint": "echo 'test' > /tmp/test.txt", "success_test": "'>' in cmd and exists('/tmp/test.txt')", "solution": ["echo 'test' > /tmp/test.txt"], "success_msg": "📤 重定向成功!" }, { "id": "tar_1", "title": "压缩文件", "desc": "将 /sandbox 目录打包压缩为 /tmp/sandbox.tar.gz", "hint": "tar -czf /tmp/sandbox.tar.gz /sandbox", "success_test": "exists('/tmp/sandbox.tar.gz')", "solution": ["tar -czf /tmp/sandbox.tar.gz /sandbox"], "success_msg": "📦 压缩成功!" }, { "id": "cron_1", "title": "定时任务", "desc": "查看当前用户的定时任务", "hint": "crontab -l", "success_test": "'crontab' in cmd", "solution": ["crontab -l"], "success_msg": "⏰ 定时任务已查看!" } ] } ] }