scoop
windows下的安裝源搜索工具,有點類似centos下的yum和Ubuntu下的apt。用這個拉下來安裝的軟件沒有廣告。
安裝條件
win7 +
powershell 3+
查看當前版本
$PSVersionTable.PSVersion
更改腳本執行的策略
set-executionpolicy remotesigned -s cu
安裝
本人不太喜歡裝在C盤里面,故更改它的安裝路徑到D盤
設置scoop環境變量
$env:SCOOP='D:\Scoop' [Environment]::SetEnvironmentVariable('SCOOP',$env:SCOOP,'User')
設置scoop global 環境變量
$env:SCOOP_GLOBAL='D:\ScoopGlobalApps' [Environment]::SetEnvironmentVariable('SCOOP_GLOBAL',$env:SCOOP_GLOBAL,'User')
這里設置環境變量第三個參數User表示用戶級別,Machine表示系統級別。Machine沒權限的話,可以手動去環境變量設置。
安裝命令
iex (new-object net.webclient).downloadstring('https://get.scoop.sh') ## 或者 iwr-useb get.scoop.sh|iex
事實上,上面兩個目前都是不可用的。
於是我配置了hosts
然后執行另一條可用的網址的命令:
iex (new-object net.webclient).downloadstring('https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1')
安裝成功。
卸載
scoop uninstall scoop
這個卸載,會刪除你配置的scoop下面的所有軟件,非常危險。
基本使用
bucket
本身的main bucket源很少,故增加新的一個較多的bucket
scoop bucket add extras
執行成功展示:
Checking repo... ok
The extras bucket was added successfully.
安裝軟件
## 安裝軟件 scoop install -g [app的名稱] ## 我這里-g 需要admin權限,取消-g可安裝 scoop install curl