- 2020年3月1日調(diào)整文章邏輯順序,增加aria2 16線程下載。
在下載了一系列軟件管理專家后,我遇到了scoop這一個(gè)神級(jí)的軟件包管理工具,他會(huì)自動(dòng)設(shè)置環(huán)境變量,也會(huì)管理程序依賴。再添加了倉(cāng)庫(kù)之后,基本能滿足我的軟件安裝和管理需求。后期我也會(huì)學(xué)習(xí)一下官方的配置寫(xiě)法,維護(hù)一下我需要的一些其他的軟件。詳情可參見(jiàn)官網(wǎng),github,github-wiki。
初級(jí)玩法:安裝scoop用以管理Windows軟件
安裝前的準(zhǔn)備
- 用戶名不含中文字符
- Windows 7 SP1+ / Windows Server 2008+
- PowerShell 3+
-
.NET Framework 4.5+
若Powershell或.NET Franmework版本過(guò)舊,更新后重啟即可。
若不清楚版本號(hào),可Win+R 運(yùn)行powershell,輸入以下命令獲取版本號(hào)。
$PSVersionTable.PSVersion.Major #查看Powershell版本
$PSVersionTable.CLRVersion.Major #查看.NET Framework版本
安裝scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb get.scoop.sh | iex
如果下載scoop的過(guò)程中斷,那么必須先刪除(C:\Users<user>\scoop)文件夾,再執(zhí)行以上命令安裝。
下載完成后,輸入scoop 出現(xiàn)如下幫助即安裝成功。
幫助文檔
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
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
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.
基本操作
查找軟件
在安裝軟件之前,推薦先查詢一下。比如我們查詢一下git:
在main 倉(cāng)庫(kù)中找到如下軟件:
'main' bucket:
git-annex (7.20190129)
git-crypt (0.6.0-701fb8e)
git-istage (0.2.61)
git-lfs (2.6.1)
git-sizer (1.3.0)
git-town (7.2.0)
git-up (1.6.1)
git-with-openssh (2.20.1.windows.1)
git (2.20.1.windows.1)
git19 (1.9.5-preview20150319)
gitignore (0.2018.08.04)
gitkube (0.3.0)
gitlab-runner (11.7.0)
gitversion (4.0.0)
mingit-busybox (2.20.1.windows.1)
mingit (2.20.1.windows.1)
psgithub (2017.01.22)
psutils (0.2018.08.04) --> includes 'gitignore.ps1'
安裝軟件
找到git的包名后,我們安裝它:
安裝成功:
Installing 'git' (2.20.1.windows.1) [64bit]
Loading PortableGit-2.20.1-64-bit.7z.exe from cache
Checking hash of PortableGit-2.20.1-64-bit.7z.exe ... ok.
Extracting dl.7z ... done.
Linking ~\scoop\apps\git\current => ~\scoop\apps\git\2.20.1.windows.1
Creating shim for 'git'.
Creating shim for 'gitk'.
Creating shim for 'git-gui'.
Creating shim for 'tig'.
Creating shim for 'git-bash'.
Creating shortcut for Git Bash (git-bash.exe)
Running post-install script...
'git' (2.20.1.windows.1) was installed successfully!
安裝完成的軟件會(huì)放在C:\Users<user>\scoop\apps。
利用aria2加速下載
在使用scoop安裝aria2后,scoop會(huì)自動(dòng)調(diào)用aria2進(jìn)行多線程下載以加速下載:
下載完成后,記得打開(kāi)16線程(aria2編譯版本默認(rèn)最高線程為16,需要更高的請(qǐng)自行編譯):
scoop config aria2-max-connection-per-server 16
scoop config aria2-split 16
scoop config aria2-min-split-size 1M
卸載軟件
更新scoop及軟件
scoop update #更新scoop
scoop update 7zip #更新7zip
scoop * #更新全部
添加倉(cāng)庫(kù)
scoop自帶的main bucket軟件過(guò)少,我們需要添加官方維護(hù)的extras bucket:
之后就可以安裝我們所需的軟件了,附我的安裝軟件清單:
scoop install calibre gimp inkscape latex zotero
第三方bucket
若在scoop search中找不到需要的軟件,可以上github上的第三方bucket查找一下。
比如安裝cajviewer,添加bucket:
scoop bucket add scoopbucket https://github.com/yuanying1199/scoopbucket
安裝cajviewer:
scoop install scoopbucket/cajviewerlite
|