跳转至

scoop快速入门

github: https://github.com/ScoopInstaller/Scoop

安装

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# 非管理员账户
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

# 管理员账户
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"

命令大全

1. 基础命令

  • 查看帮助
    scoop help
    scoop help <command>  # 查看具体命令帮助
    
  • 安装软件
    scoop install <app>  # 安装指定应用
    scoop install <app>@<version>  # 安装特定版本(如 python@3.7.9)
    
  • 卸载软件
    scoop uninstall <app>
    
  • 列出已安装软件
    scoop list
    

2. 更新与维护

  • 更新 Scoop 自身
    scoop update
    
  • 更新所有软件
    scoop update *
    
  • 更新指定软件
    scoop update <app>
    
  • 清理旧版本
    scoop cleanup <app>  # 清理单个应用的旧版本
    scoop cleanup *      # 清理所有应用的旧版本
    

3. 版本管理

  • 切换软件版本
    scoop reset <app>@<version>  # 如 scoop reset python@3.7.9
    
  • 查看软件信息
    scoop info <app>
    

4. Bucket(软件源)管理

  • 添加 Bucket
    scoop bucket add <bucket-name>  # 如 extras、nerd-fonts
    scoop bucket add <name> <repo-url>  # 添加自定义 Bucket(如 dorado 国内源)
    
  • 列出已知 Bucket
    scoop bucket known
    
  • 列出已添加 Bucket
    scoop bucket list
    
  • 删除 Bucket
    scoop bucket rm <bucket-name>
    

添加官方推荐的源: https://scoop.sh/#/buckets

我添加的源

scoop bucket add devtools https://github.com/anderlli0053/DEV-tools

scoop bucket add main https://github.com/lzwme/scoop-proxy-cn
scoop bucket add nerd-fonts
scoop bucket add okibcn_ScoopMaster https://github.com/okibcn/ScoopMaster
scoop bucket add kkzzhizhou_scoop-apps https://github.com/kkzzhizhou/scoop-apps
scoop bucket add duzyn_scoop-cn https://github.com/duzyn/scoop-cn

5. 搜索与状态检查

  • 搜索软件
    scoop search <keyword>  # 原版搜索(较慢)
    scoop-search <keyword>  # 推荐使用第三方工具(需先安装 scoop-search)
    
  • 检查更新状态
    scoop status  # 列出可更新的软件
    

6. 高级配置

  • 启用/禁用 aria2 多线程下载
    scoop install aria2  # 安装 aria2
    scoop config aria2-enabled true/false  # 启用/禁用
    
  • 设置代理
    scoop config proxy 127.0.0.1:1080  # 配置代理
    
  • 导出软件列表
    scoop list > %HOMEPATH%\Desktop\applist.txt  # 导出到桌面
    

7. 实用工具推荐

  • 安装开发者工具(如 Python、Node.js、Go)
    scoop install python nodejs go
    
  • 安装字体(如 Nerd Fonts)
    scoop bucket add nerd-fonts
    scoop install FiraCode-NF
    
  • Windows 增强工具(如 gsudo、proxychains)
    scoop install gsudo  # 类似 Linux 的 sudo
    

常见问题解决

  • Hash 校验失败
    使用 scoop install -s <app> 忽略校验。
  • 开机不自启服务
    可通过 winsw 管理服务(需手动配置 XML 文件)。

以上命令覆盖了 Scoop 的核心功能,更多细节可参考 Scoop Wiki 或通过 scoop help 查看。如需国内加速,可添加 dorado 等镜像源。

评论