Since I have been using Mac for work and am used to the convenience of installing software packages with brew on Mac, I recently installed Windows on my company computer. I want to try it out. How can I install software packages as smoothly as on MAC? Of course, the protagonist I recommend today is Scoop.

Scoop is an open source project that mainly installs Windows software packages through commands. It can avoid permission pop-ups, hide the GUI wizard installation, and automatically find installation dependencies and automatically execute installation steps.

Official website address: https://scoop.sh/

Open source project address: https://github.com/ScoopInstaller/Scoop

In addition, the scoop package can be used as part of the git repository, usually called buckets. You can view the buckets on github here at https://scoop.sh/#/buckets. Of course, you can also easily create your own buckets.

Environment Preparation

  • Windows 10 Professional 19044.1586
  • The latest version of PowerShell or Windows PowerShell 5.1
  • The PowerShell execution policy must be one of the following: Unrestricted, RemoteSigned, or ByPass to execute the installer.

Install Scoop

Run this command from a non-admin PowerShell to install Scoop with the default configuration. Scoop will be installed to C:\Users<YOUR USERNAME>\scoop

You will be prompted to change the policy when installing here:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
PS C:\Users\wnote> iwr -useb get.scoop.sh | iex
Initializing...
PowerShell requires an execution policy in [Unrestricted, RemoteSigned, ByPass] to run Scoop. For example, to set the execution policy to 'RemoteSigned' please run 'Set-ExecutionPolicy RemoteSigned -Scope CurrentUser'.
Abort.
PS C:\Users\wnote> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Execution Policy Change
Execution policy helps you prevent the execution of untrusted scripts. Changing execution policies can create security risks, as described in the about_Execution_Policies Help topic at https:/go.microsoft.com/fwlink/?LinkID=135170
. Do you want to change the execution policy?
[Y] Yes (Y) [A] Yes to all (A) [N] No (N) [L] No to all (L) [S] Pause (S) [?] Help (default is "N"): Y
PS C:\Users\tarena> iwr -useb get.scoop.sh | iex
Initializing...
Downloading ...
Creating shim...
Adding ~\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.

PS C:\Users\tarena> scoop update
Updating Scoop...
Updating 'main' bucket...
Scoop was updated successfully!

Of course, if your network cannot connect to the official address, you can add a proxy method:

1
irm get.scoop.sh -Proxy 'http://<ip:port>' | iex

In addition, if you do not want to install the default path, you can specify it as follows, install.ps1 refers to https://github.com/ScoopInstaller/Install/blob/master/install.ps1:

1
.\install.ps1 -ScoopDir 'D:\Applications\Scoop' -ScoopGlobalDir 'F:\GlobalScoopApps' -NoProxy

Change domestic sources

Several domestic sources can be used on the Internet: https://gitee.com/squallliu/scoop https://gitee.com/glsnames/scoop-installer

1
2
3
iwr -useb https://gitee.com/glsnames/scoop-installer/raw/master/bin/install.ps1 | iex
scoop config SCOOP_REPO https://gitee.com/glsnames/scoop-installer
scoop update

Install the package

1
2
3
4
5
6
7
8
scoop install kubectl
scoop install helm
scoop install wget
scoop install curl
scoop install 7zip
scoop install aria2
scoop install sudo
scoop install -g extras/windows-terminal

If the installation is stuck, it is recommended to configure the proxy

1
2
scoop config proxy 127.0.0.1:18080 #Set http proxy
scoop config rm proxy #Delete proxy

Configure multi-threaded download artifact aria2

1
2
3
4
5
6
scoop config aria2-enabled false
scoop config aria2-warning-enabled false
scoop config aria2-retry-wait 4
scoop config aria2-split 16
scoop config aria2-max-connection-per-server 16
scoop config aria2-min-split-size 4M

Scoop common commands

1
2
3
4
scoop install "app name" #install software package
scoop list #check installed software
scoop status #check update status
scoop config #check configuration

Reference: https://github.com/ScoopInstaller/Install