← 返回文档

Config Hub CLI

Config Hub 提供面向管理员的命令行工具 linxira-config,负责 SSH、镜像源、网络、安全状态与只读 catalog 查询。通用软件管理由 Shelly 负责,精选应用安装由 Package Center / Component Manager 基于 linxira-components 事务后端完成。

命令总览

linxira-config <command> [action] [options]

  mirror <type>        镜像源管理(Arch/npm/pip/AUR/Go/Flatpak)
  source               查看软件源
  service <svc> <act> 服务管理(ssh/vnc)
  security <action>    安全加固与防火墙
  ssh <action>         SSH 服务与密钥管理
  rdp <action>         远程桌面状态
  virt <action>        虚拟化状态
  power <action>       电源状态
  catalog <kind>       查询软件/组件/套餐状态
  runtime <action>     运行时与包管理器状态
  conda channels <act> Miniforge 频道配置
  gpu <action>         GPU 驱动管理
  net <action>         网络诊断
  info / status        系统信息 / 快速状态
  help                 帮助

SSH 管理

Config Hub 提供完整的 SSH 服务与密钥管理。把电脑变成服务器的分步教程见 远程访问指南

linxira-config ssh status                       # 服务状态与连接信息
linxira-config ssh key generate [name]          # 生成 Ed25519 密钥对
linxira-config ssh key list                     # 列出本机公钥
linxira-config ssh key show [name]              # 显示公钥内容
linxira-config ssh key fingerprint [name]       # 显示公钥指纹
linxira-config ssh key remove <name> --yes      # 删除密钥对
linxira-config ssh authorized list              # 列出已授权密钥
linxira-config ssh authorized add <pubkey>      # 授权一个纯公钥
linxira-config ssh authorized remove <fp> --yes # 按 SHA256 指纹移除
📌 ssh on / off / port 已实现但需等待事务后端启用,当前请用 sudo systemctl enable --now sshdssh keyssh authorized 命令现在即可用。密钥为 Ed25519,拒绝 symlink 的 SSH 路径,authorized add 只接受无 options 的纯公钥。

镜像源管理

管理 Arch、npm、PyPI、AUR、Go 模块与 Flatpak 远程源:

linxira-config mirror arch list         # 列出 Arch 镜像候选
linxira-config mirror npm set taobao    # 选择用户级 npm 源
linxira-config mirror pip set tuna      # 选择 PyPI 源
linxira-config mirror aur set https://... # 设置校验过的自定义 AUR 镜像
linxira-config mirror go set goproxy.cn # 配置 Go 模块代理
linxira-config mirror flatpak set flathub # 显式 Flatpak 远程(主动开启)
linxira-config mirror <type> reset      # 恢复官方源
linxira-config mirror <type> speed [id] # 测速

用户级源按用户生效(npm config / pip config / go env -w)。Arch 与 Flatpak 的 set/reset 待事务后端启用。Conda 仅限 Miniforge,只允许审核过的 conda-forgebioconda 频道。

Catalog 查询(只读)

查询经审核的 catalog 状态。命令接受 catalog ID,不接受包名:

linxira-config catalog software --all
linxira-config catalog component --status partial
linxira-config catalog bundle show kde-plasma
linxira-config catalog software show firefox

默认只显示 installedpartialexternalpendingdriftedreboot-required 状态;--all 增加 not-installed

网络与安全

linxira-config net diag              # 完整网络诊断
linxira-config net dns               # 查看当前 DNS
linxira-config security status       # 防火墙与 SSH 状态
linxira-config runtime status        # 运行时与包管理器状态

问题、bug 与功能建议请提交到 linxira-config-hub 仓库