Windows下强大的包管理器-Scoop
BB Time
上一篇里介绍了winget包管理器的使用,这一篇里咱们说一下scoop包管理器.
这个包管理器出现的很早,也很成熟了,用起来更接近Linux终端的体验.我是作为winget的补充来使用的.
主要用来管理我的开发环境.
官方解释
Scoop is a command-line installer for Windows.
Scoop 是一款Windows下的命令行软件管理工具.
What does Scoop do?
Scoop installs programs from the command line with a minimal amount of friction. It:
- Eliminates permission popup windows
- Hides GUI wizard-style installers
- Prevents PATH pollution from installing lots of programs
- Avoids unexpected side-effects from installing and uninstalling programs
- Finds and installs dependencies automatically
- Performs all the extra setup steps itself to get a working program
Scoop is very scriptable, so you can run repeatable setups to get your environment just the way you like, e.g.:
scoop install sudo
sudo scoop install 7zip git openssh --global
scoop install aria2 curl grep sed less touch
scoop install python ruby go perl
简单来说,他比winget更强大(只是不够本土化,winget的软件本土化做的要更好一些,但对我来说在环境管理方面,scoop也有不可替代性)
.
安装教程
打开Windows Terminal
后输入
iwr -useb get.scoop.sh | iex
即可完成安装
PS C:\Users\13538> iwr -useb get.scoop.sh | iex
Initializing...
Downloading...
Extracting...
Creating shim...
Adding ~\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.
我在安装的时候报错了
PS C:\Users\13538> iwr -useb get.scoop.sh | iex
Initializing...
PowerShell requires an execution policy in [Unrestricted, RemoteSigned, ByPass] to run Scoop. For example, to set the execution policy to 'RemoteSigned' please run 'Set-ExecutionPolicy RemoteSigned -Scope CurrentUser'.
Abort.
只需要按照提示执行一下
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
之后再重新执行安装程序即可
配置教程
修改用户安装程序和全局安装程序默认安装位置
直接修改环境变量
命令行方式
$env:SCOOP='D:\Scoop Data'
[Environment]::SetEnvironmentVariable('SCOOP',