Window包管理工具Scoop


自定義安裝路徑安裝

scoop安裝應用路徑

目標目錄是D:\Program Files\Scoop,在PowerShell命令控制台中運行:

[environment]::setEnvironmentVariable('SCOOP','D:\Scoop','User')
$env:SCOOP='D:\Scoop'
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

全局應用安裝路徑

假設目標目錄是D:\Program Files\Scoop\globalApps,在PowerShell命令控制台中運行:

[environment]::setEnvironmentVariable('SCOOP_GLOBAL','D:\Scoop\globalApps','Machine')
$env:SCOOP_GLOBAL='D:\Scoop\globalApps'

整合

[environment]::setEnvironmentVariable('SCOOP','D:\Scoop','User')
$env:SCOOP='D:\Scoop'
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
[environment]::setEnvironmentVariable('SCOOP_GLOBAL','D:\Scoop\GlobalApps','Machine')
$env:SCOOP_GLOBAL='D:\Scoop\GlobalApps'

上面的Machine是配置系統變量

如果使用User就是配置用戶變量

系統變量優先級比用戶變量高,所以使用全局下載的變量配置權限高。

基本命令

命令 動作
🌟search 搜索軟件名
🌟install 安裝軟件
update 更新軟件
🌟status 查看軟件狀態
uninstall 卸載軟件
info 查看軟件詳情
home 打開軟件主頁
#重置應用以解決沖突,會重置環境變量,快捷方式等..
scoop reset *
#檢查潛在的問題..執行下看看使用scoop會有什么問題
scoop checkup
#如果使用了aria2感覺慢的話可以關閉
scoop config aria2-enabled false  
#下面是日常更新軟件命令
sudo scoop update * -g ; scoop update * ; sudo scoop cleanup * -g ; scoop cleanup *
# 查看 Scoop 還能直接識別哪些 bucket
scoop bucket known
#安裝具體版本軟件
scoop install postman@7.17.0

設置代理並多線程下載

命令執行:

scoop config proxy 127.0.0.1:8118

設置配置:

配置文件路徑:C:\Users\qhong\.config\scoop

{
    "lastupdate":  "2019-11-09T09:45:50.0880266+08:00",
    "SCOOP_REPO":  "https://github.com/lukesampson/scoop",
    "SCOOP_BRANCH":  "master",
    "proxy":  "127.0.0.1:8118"
}

配置存留persist

這里最值得稱道的是persist文件夾,因為我們知道,scoop安裝的所有軟件都是安裝在scoop文件夾下的,那如果軟件升級了的話,以前舊軟件的設置和數據是不是全部清除了呢?例如vscode上的設置和安裝的插件,是不是升級了之后,都沒有了呢?不是的,因為scoop會將各個軟件的設置數據,例如vscode軟件的data文件夾(vscode的設置和插件都放在data文件夾),單獨放到persist文件夾中,在用軟鏈接鏈接到軟件所在的文件夾,這樣,每次升級軟件,persist文件夾的各個軟件的設置數據都會保持不變,從而保存設置.

另一個需要注意的是,所有的對scoop操作都不要在文件夾中進行,因為有可能會破壞scoop的文件結構,想要對scoop進行任何操縱,都需要在命令行中進行

桶bucket

在 Scoop 里面,bucket 就是一個軟件倉庫。Scoop 將一個個倉庫緩存至本地,當我們想要安裝一個軟件的時候,Scoop 就從本地的倉庫中挑選出我們想要安裝的軟件的安裝配置文件,並依照這個配置文件進行軟件的安裝工作。

scoop可以直接識別的bucket

$ scoop bucket known
main
extras
versions
nightlies
nirsoft
php
nerd-fonts
nonportable
java
games
jetbrains

添加常用的bucket

###添加桶
scoop bucket add extras;
scoop bucket add Java;
scoop bucket add versions;
scoop bucket add Ash258 'https://github.com/Ash258/Scoop-Ash258.git'
scoop bucket add dorado https://github.com/h404bi/dorado
scoop bucket add iszy https://github.com/ZvonimirSun/scoop-iszy
scoop bucket add dodorz https://github.com/dodorz/scoop-bucket
scoop bucket add rasa https://github.com/rasa/scoops
scoop bucket add scoopet https://github.com/integzz/scoopet
scoop bucket add raresoft https://github.com/L-Trump/scoop-raresoft

建立一個bucket

1.github創建自己的倉庫 scoop-buckets
2.拉取到本地,並cd進入
3.按bucket規則創建一個json文件,比如:oraclejdk8.json
4.git推送提交
5.將該git倉庫配置為本地的桶即可

案例:

$ scoop bucket add qhong https://gitee.com/hongdada/scoop-buckets
Checking repo... ok
The qhong bucket was added successfully.

$ scoop bucket list
Ash258
dorado
extras
iszy
Java
main
qhong
versions
wangzq

應用

前置安裝應用

配置下載:

#下載
scoop install aria2;

只有安裝了aria2,可以多線程下載,后面的應用下載才會快

而且必須配置代理,因為桶配置都是放在github

常裝應用

scoop install sudo
scoop install git curl 7zip coreutils
#解壓
scoop install bandizip;
#瀏覽器
scoop install chrome;
#cmd
scoop install Cmder;
#文件檢索
scoop install everything;
#git,程序員必備
scoop install git;
#包管理
scoop install maven;
#遠程終端
scoop install MobaXterm;
#播放器
scoop install potplayer;
#redis
scoop install redis;
#桌面控制
scoop install teamviewer;
#markdown編寫
scoop install typora;
#編輯器
scoop install vscode;
#效率啟動神器
scoop install WOX;
#離線文檔瀏覽器
scoop install zeal;

scoop install aria2 curl grep sed less touch
scoop install python ruby go perl


###安裝全局應用
scoop install mysql56 -g;
scoop install nodejs -g;
scoop install oraclejdk8 -g;
scoop install python36 -g;

###安裝具體某個bucket下的軟件
scoop install dodorz/qqmusic

aria2下載命令

$ aria2c http://down.sandai.net/thunderx/XunLeiWebSetup10.1.16.466dl.exe

11/12 17:53:33 [NOTICE] Downloading 1 item(s)

11/12 17:53:34 [NOTICE] Download complete: D:/Development/huishi-server/XunLeiWebSetup10.1.16.466dl.exe

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
67cbeb|OK  |    10MiB/s|D:/Development/huishi-server/XunLeiWebSetup10.1.16.466dl.exe

Status Legend:
(OK):download completed.

注意,命令是使用aria2c

WindowTerminal

scoop install windows-terminal

設置右鍵快捷鍵:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal]
@="Windows Terminal Here"
"Icon"="D:\\Scoop\\data\\windows-terminal\\terminal.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal\command]
@="D:\\Scoop\\apps\\windows-terminal\\current\\WindowsTerminal.exe"

將以上代碼保存到擴展名為 .reg 的文件中,雙擊打開

當前目錄打開時,Terminal 里的路徑不是當前目錄

檢查一下配置文件,看下是否有以下內容,刪除之后就可以了。

{
    "profiles": [
        {
            "startingDirectory" : "%USERPROFILE%"
        }
    ]
}

需要修改為

"startingDirectory": null

如果沒有就自己配置這個參數設置為null

配置文件路徑:

C:\Users\qhong\AppData\Local\Microsoft\Windows Terminal\profiles.json

不能輸入中文問題

將win10打開設置,時間和語言→語言→管理語言設置→更改系統區域設置→勾選Beta...提供全球語言支持,然后重啟,再打開windows terminal即可使用中文輸入。然后神奇的事情發生了,即使此時關閉當時的勾選,再次重啟仍可在windows terminal使用中文輸入法。

2.設置環境變量 LESSCHARSET=utf-8

profiles.json配置

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
	"$schema": "https://aka.ms/terminal-profiles-schema",

	"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",

	"globals": {
		"alwaysShowTabs": true,
		"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
		"initialCols": 98,
		"initialRows": 28,
		"keybindings": [{
				"command": "closeTab",
				"keys": [
					"ctrl+w"
				]
			}
		],
		"requestedTheme": "system",
		"showTabsInTitlebar": true,
		"showTerminalTitleInTitlebar": true
	},
	"profiles": [{
			"acrylicOpacity": 0.75,
			"closeOnExit": true,
			"colorScheme": "Campbell",
			"commandline": "powershell.exe",
			"cursorColor": "#FFFFFF",
			"cursorShape": "bar",
			"fontFace": "Hack",
			"fontSize": 14,
			"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
			"historySize": 9001,
			"icon": "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
			"name": "Windows PowerShell",
			"snapOnInput": true,
			"startingDirectory": null,
			"useAcrylic": true
		}, {
			// Make changes here to the cmd.exe profile
			"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
			"name": "cmd",
			"commandline": "cmd.exe",
			"hidden": false
		}, {
			"guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
			"hidden": false,
			"name": "Ubuntu-18.04",
			"source": "Windows.Terminal.Wsl"
		}, {
			"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
			"hidden": false,
			"name": "Azure Cloud Shell",
			"source": "Windows.Terminal.Azure"
		}
	],
	"schemes": [{
			"background": "#0C0C0C",
			"black": "#0C0C0C",
			"blue": "#0037DA",
			"brightBlack": "#767676",
			"brightBlue": "#3B78FF",
			"brightCyan": "#61D6D6",
			"brightGreen": "#16C60C",
			"brightPurple": "#B4009E",
			"brightRed": "#E74856",
			"brightWhite": "#F2F2F2",
			"brightYellow": "#F9F1A5",
			"cyan": "#3A96DD",
			"foreground": "#CCCCCC",
			"green": "#13A10E",
			"name": "Campbell",
			"purple": "#881798",
			"red": "#C50F1F",
			"white": "#CCCCCC",
			"yellow": "#C19C00"
		}
	]
}

// Add any keybinding overrides to this array.
// To unbind a default keybinding, set the command to "unbound"
"keybindings": []
}

搜集的應用:

7zip Aida64 AoMeiPartition aria2 baidunetdisk cacert CCleanerPro cmder cpu-z crystaldiskinfo crystaldiskmark curl dark dingtalk DiskGenius dismplusplus ditto everything geekuninstaller git googlechrome gpu-z gradle grep IDM innounp less lessmsi lxrunoffline maven motrix nodejs notepadplusplus openssl oraclejdk8 pandoc postman privoxy process-explorer python QQLive QQMusic redis-desktop-manager screentogif shadowsocksr-csharp snipaste SpaceSniffer switchhosts teamviewer touch typora utools vim vscode-portable wechat wget windows-terminal wireshark wox Youdaodict zookeeper 

參考:

windows系統包管理工具scoop安裝使用

給 Scoop 加上這些軟件倉庫,讓它變成強大的 Windows 軟件管理器

Windows 包管理器 Scoop 設置

官網

官網快速入門

Scoop buckets by Github score


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM