yzbtdiy

yzbtdiy

github
bilibili

Windows Package Management Tool Scoop

Scoop is a powerful Windows package management tool that allows you to install software quickly and conveniently through the command line, similar to tools like yum, apt, and pacman in Linux.

Installation and Configuration#

Add environment variables (optional, custom installation path)

# User environment variable
$env:SCOOP='D:\ScoopApp'
[environment]::setEnvironmentVariable('SCOOP',$env:SCOOP,'User')
# Global environment variable
$env:SCOOP_GLOBAL='D:\GlobalScoopApps'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')

Run installation script

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
# or shorter
iwr -useb get.scoop.sh | iex

Allow current user to execute remote scripts in PowerShell

Set-ExecutionPolicy RemoteSigned -scope CurrentUser

Add software repositories

# View available repositories
scoop bucket known
# Add a repository
scoop bucket add BUCKET_NAME

Usage#

Install and uninstall packages

# Install for current user
scoop install/uninstall PACKAGE_NAME
# Global installation
scoop install/uninstall PACKAGE_NAME -g

Search for packages

scoop search KEYWORD

Update packages

scoop update *
scoop update * -g

Remove old versions

scoop cleanup *
scoop cleanup * -g

Clear the cache

scoop cache rm *

Set proxy for faster downloads

scoop config proxy 127.0.0.1:10809

Switch versions, use this command to fix environment variables after reinstalling the system

scoop reset PACKAGE_NAME

Use aria2 for accelerated multi-threaded downloads

scoop install aria2 -g
scoop config aria2-enabled true  // Enable aria2
scoop config aria2-enabled false  // Disable aria2
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.