什么是Scoop?
scoop是用于windows系统的包管理工具,提供了类似于Ubuntu的apt包管理工具的功能。它能够让你使用一条cmd命令scoop install <package-name>
来安装软件,并自动解析包的依赖以及自动管理安装的软件。scoop是github上的一个开源项目,github仓库地址:https://github.com/lukesampson/scoop。
系统要求
scoop需要以下环境:
- Windows 7 SP1+ / Windows Server 2008+
- PowerShell 5
安装scoop
在PowerShell中执行下面的命令,赋予PowerShell执行脚本的权限:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
在PowerShell中运行下面的命令安装scoop:
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
或者下面的短命令:
iwr -useb get.scoop.sh | iex
这两个命令都是先去https://get.scoop.sh下载用于安装scoop的PowerShell脚本install.ps1
,它会重定向到https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1
下载,所以如果你执行失败,可能是你无法访问https://raw.githubusercontent.com/
,那么你可能需要科学上网!
默认scoop将会安装到C:\Users\<user>\scoop
。
scoop使用
安装完成之后就可以在PowerShell中使用scoop
命令了。
输入scoop
查看命令帮助:
PS C:\Users\gyb_c> scoop
Usage: scoop <command> [<args>