為當前Windows賬戶啟用PowerShell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
配置安裝目錄
如果需要配置全局安裝目錄边涕,需要PowerShell在管理員模式下運行
可以使用 win + q
搜索打開PowerShell管理員模式,也可以執(zhí)行以下命令
Start-Process PowerShell -verb runAs
用戶安裝的程序和scoop本身位于C:\Users<user>\scoop。
全局安裝的程序(–global)位于C:\ProgramData\scoop鞠抑。
可以通過環(huán)境變量更改這些設(shè)置五辽。具體步驟如下:
# 將Scoop安裝到自定義目錄(命令行方式)
$env:SCOOP='D:\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
# 將Scoop配置為將全局程序安裝到自定義目錄 SCOOP_GLOBAL(命令行方式)弥虐,這一步可省略
$env:SCOOP_GLOBAL='D:\GlobalScoopApps'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
安裝Scoop
執(zhí)行以下命令中的一個即可安裝
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
# 或
iwr -useb get.scoop.sh | iex
安裝完成后執(zhí)行scoop help
驗證是否安裝成功
PS C:\Windows\system32> scoop help
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
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's hash on virustotal.com
which Locate a shim/executable (similar to 'which' on Linux)
Type 'scoop help <command>' to get help for a specific command.
配置代理加速
由于眾所周知的原因漓踢,使用scoop安裝網(wǎng)速會比較慢挽鞠,這里配置一下代理加速疚颊,也就是本地的代理地址了
scoop config proxy 127.0.0.1:7890
這一步也可以通過修改scoop的配置文件~/.config/scoop/config.json
實現(xiàn)
軟件安裝
- 添加bucket軟件源
scoop bucket add extras
- 安裝aria2
aria2是一款下載工具,安裝以后可以提高scoop下載的速度
scoop install aria2
- 安裝switchhosts
switchhosts可以很方便的管理和切換hosts
scoop install switchhosts
- 安裝figlet
figlet可以將你輸入的字符打印在終端上
scoop install figlet
PS C:\Windows\system32> figlet I love you
___ _
|_ _| | | _____ _____ _ _ ___ _ _
| | | |/ _ \ \ / / _ \ | | | |/ _ \| | | |
| | | | (_) \ V / __/ | |_| | (_) | |_| |
|___| |_|\___/ \_/ \___| \__, |\___/ \__,_|
|___/
其他
Scoop 有許多優(yōu)秀的Bucket信认,你可以通過運行scoop bucket known
來獲取官方支持的bucket:
bucket源推薦:
scoop bucket add main # 默認
scoop bucket add extras # 推薦
scoop bucket add versions
scoop bucket add nightlies
scoop bucket add nirsoft
scoop bucket add php
scoop bucket add nerd-fonts
scoop bucket add nonportable
scoop bucket add java
scoop bucket add games
scoop bucket add jetbrains # 推薦
國內(nèi)常用軟件:
微信材义、QQ、釘釘……
scoop bucket add dorado https://github.com/h404bi/dorado
小新Bucket:
FSCapture嫁赏、Shadowsocksrr其掂、UninstallTool、Notepad3橄教、Wechat……
scoop bucket add dajiu https://github.com/dajiiu/dajiu-scoop
其他:
scoop bucket add dodorz https://github.com/dodorz/scoop-bucket
參考文章
再談?wù)?Scoop 這個 Windows 下的軟件包管理器
Windows下Scoop安裝清寇、配置與使用
Windows | Scoop軟件包管理神器