banner
biuaxia

biuaxia

"万物皆有裂痕,那是光进来的地方。"
github
bilibili
tg_channel

Windows使用Scoop管理軟體包

Preparatory work#

Note: Make sure your current PowerShell is PowerShell 5 or a later version.

Installing Scoop#

Configuring the installation location and PATH variable (optional)#

Note: Replace lzwang below with your own Windows username.

$env:SCOOP='C:\Users\lzwang\scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')

Installing Scoop#

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

1.png

Note: You need to restart Windows Terminal for the environment variable to take effect.

Using Scoop#

Installing necessary packages#

scoop install git

2.png

Adding package repositories#

scoop bucket add main
scoop bucket add extras
scoop bucket add nerd-fonts

All available repositories are as follows, refer to Scoop Apps

3.png

Common Scoop commands#

# Update scoop and the package list
scoop update

# View the current available repo list
scoop bucket list

## Installing software ##
# Non-global installation (and disable package cache)
scoop install -k <app>
# Global installation (and disable package cache)
sudo scoop install -gk <app>

## Uninstalling software ##
# Uninstall non-global software (and delete configuration files)
scoop uninstall -p <app>
# Uninstall global software (and delete configuration files)
sudo scoop uninstall -gp <app>

## Updating software ##
# Update all non-global software (and disable package cache)
scoop update -k *
# Update all software (and disable package cache)
sudo scoop update -gk *

## Cleaning up garbage ##
# Delete all old versions of non-global software (and delete package cache)
scoop cleanup -k *
# Delete all old versions of software (and delete package cache)
sudo scoop cleanup -gk *
# Clear package cache
scoop cache rm *

Using Aria2 for multi-threaded downloads#

Installing Aria2

scoop install aria2

Download configuration
Set the maximum number of connections per task to 32, the maximum number of connections per server to 16, and the minimum file fragment size to 1M.

scoop config aria2-split 32
scoop config aria2-max-connection-per-server 16
scoop config aria2-min-split-size 1M
scoop config aria2-warning-enabled false  # Disable warnings

Disable multi-threaded downloads

scoop config aria2-enabled false

Installing NF (nerd font) fonts#

When installing fonts, it is recommended to install them for all users with administrator privileges. Otherwise, there may be issues with Windows Terminal or VS Code not finding the fonts. If you have already installed them incorrectly, remove the ineffective fonts first and then reinstall them, which should generally take effect.

scoop install sudo
sudo scoop install FiraCode-NF FiraCode-NF-Mono
sudo scoop install Iosevka-NF

Managing packages with Scoop#

For example, download the curl tool

scoop install curl

4.png

Installing common packages#

scoop install curl wget sudo vim vimtutor grep touch miniconda3 mpv yt-dlp ffmpeg

References#

  1. Scoop
  2. Scoop - The Best Windows Package Manager - P3TERX ZONE
  3. Windows Terminal Beautification + PowerShell Plugin Configuration - DiaosSama's Blog
  4. Installing · tonsky/FiraCode Wiki
  5. GitHub - duzyn/scoop-cn: Scoop application library available to Chinese users, synchronizing the official Scoop library daily to accelerate application downloads
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。