Scoop:开源的Windows包管理工具
Scoop包管理工具安装过程
一、安装:
github地址:Scoop
1、方法一
1.1 设定用户安装目录(通过Scoop安装的软件存放的位置),这里设置 E:\Scoop
$env:SCOOP='E:\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
1.2 保证自己与github的网络连通性,执行安装脚本(Administartor账号会报错)
irm get.scoop.sh | iex
1.3 Scoop安装脚本默认禁止管理员账户安装,我安装的是默认Administrator账户,出现报错:
1.4 更改PowerShell默认的执行策略,并用启用Scoop的管理员安装功能:
set-executionpolicy remotesigned
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
完整命令执行效果如下:
2、方法二
自行修改E:\Scoop
路径
# 脚本执行策略更改
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
# 输入Y或A,同意
Y
# 执行安装命令(默认安装在用户目录下,如需更改请执行“自定义安装目录”命令)
iwr -useb scoop.201704.xyz | iex
## 自定义安装目录(注意将目录修改为合适位置)
irm scoop.201704.xyz -outfile 'install.ps1'
.\install.ps1 -ScoopDir 'E:\Scoop' -ScoopGlobalDir 'E:\Scoop'
二、配置国内源,以及基础功能使用
2.1 更换镜像(国内加速)
# 更换scoop的repo地址
scoop config SCOOP_REPO "https://gitee.com/scoop-installer/scoop"
# 拉取新库地址
scoop update
2.2添加bucket
#必装git,scoop及bucket更新均依赖此软件
scoop install git
#查询已知bucket
scoop bucket known
#添加bucket
scoop bucket add extras
2.3 添加第三方bucket
# 基本语法
scoop bucket add <别名> <git地址>
# 举例添加scoopcn([Mostly Chinese applications / 大多是国内应用程序](https://github.com/scoopcn/scoopcn))
scoop bucket add scoopcn https://gitee.com/scoop-installer/scoopcn
2.4 删除bucket
scoop bucket rm <别名>
三、使用
3.1 搜索、安装、卸载软件
## 搜索软件
scoop search <软件名>
## 安装
scoop install <软件名>
## 卸载
scoop uninstall qq wechat
3.2 常用命令
Usage: scoop <command> [<args>]
Some useful commands are:
alias Manage scoop aliases # 管理指令的替身
bucket Manage Scoop buckets # 管理软件仓库
cache Show or clear the download cache # 查看与管理缓存
checkup Check for potential problems # 做个体检
cleanup Cleanup apps by removing old versions # 清理缓存与旧版本软件包
config Get or set configuration values # 配置Scoop
create Create a custom app manifest # 创建自定义软件包
depends List dependencies for an app # 查看依赖
export Exports (an importable) list of installed apps # 导出软件包列表
help Show help for a command # 显示帮助指令
hold Hold an app to disable updates # 禁止软件包更新
home Opens the app homepage # 打开软件包主页
info Display information about an app # 显示软件包信息
install Install apps # 安装软件包的指令
list List installed apps # 列出所有已安装软件包
prefix Returns the path to the specified app # 查看软件包路径
reset Reset an app to resolve conflicts # 恢复软件包版本
search Search available apps # 搜索软件包
status Show status and check for new app versions # 查看软件包更新状态
unhold Unhold an app to enable updates # 启动软件包更新
uninstall Uninstall an app # 卸载软件包的指令
update Update apps, or Scoop itself # 更新软件包
virustotal Look for app hash on virustotal.com # 查看哈希值
which Locate a shim/executable (similar to 'which' on Linux) # 查看可执行程序路径
Scoop:开源的Windows包管理工具
https://szsc.asia/2024/07/17/scoop-kai-yuan-de-windows-bao-guan-li-gong-ju/