安装和卸载

1
2
#powershell允许安装脚本权限
set-executionpolicy remotesigned -scope currentuser

修改默认安装位置:

  • 默认安装应用到 C:\User\用户名\scoop

    默认全局安装的在 C:\ProgramData\scoop

1
2
3
4
5
6
7
8
9
10
11
12
13
#修改默认安装位置,打开powershell,设置变量,安装即可
$env:SCOOP='D:\Scoop\scoop'
[environment]::setEnvironmentVariable('SCOOP',$env:SCOOP,'User')

#如果需要修改全局安装变量,管理员打开powershelll,设置变量,上面的变量也要一起设置一下,然后安装
$env:SCOOP_GLOBAL='D:\Scoop\scoop_global'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')

#安装
irm get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
#或者
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"

卸载:

1
scoop uninstall scoop

设置/取消代理

1
2
3
4
#设置http代理 -> 无需设置
scoop config proxy 127.0.0.1:7890
#删除代理
scoop config rm proxy

软件库 bucket

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#查看已知库
scoop bucket known
#查看已经安装的库
scoop bucket list

#添加软件库
scoop bucket add <bucketname>
#比如:
scoop bucket add extras
#添加第三方库
scoop bucket add <bucketname> <bucket_url>

#删除安装的库
scoop bucket rm <bucketname>

简单使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#查看帮助
scoop help

#搜索软件
scoop search xxx
#安装软件
scoop install xxx
#全局安装,需要管理员权限
scoop install -g xxx
#卸载软件,不推荐使用第三方软件卸载,如果需要卸载也最好使用scoop。
scoop uninstall xxx
#卸载全局安装的软件
scoop uninstall -g xxx
#查看已安装的软件
scoop list
#更新
scoop update *
#查看软件信息
scoop info xxx

#清理旧版安装包:
scoop cleanup *
#清理下载缓存
scoop cache rm *

#其他命令
alias Manage scoop aliases # 管理指令的替身
cache Show or clear the download cache # 查看与管理缓存
checkup Check for potential problems # 做个体检
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 # 导出软件包列表
hold Hold an app to disable updates # 禁止软件包更新
home Opens the app homepage # 打开软件包主页
prefix Returns the path to the specified app # 查看软件包路径
reset Reset an app to resolve conflicts # 恢复软件包版本
status Show status and check for new app versions # 查看软件包更新状态
unhold Unhold an app to enable updates # 启动软件包更新
virustotal Look for app hash on virustotal.com # 查看哈希值
which Locate a shim/executable (similar to 'which' on Linux) # 查看可执行程序路径