包管理器(Package managers),如Chocolatey、Ninite、Windows 包管理器 (WinGet)(Windows Package Manager (WinGet)),仅举几例可能是最流行的包管理器,是下载程序的有效方式,无需手动访问软件供应商站点、下载文件并运行安装程序。在这篇文章中,我们来看看一个类似的应用程序 - Scoop,关于如何在Windows 11/10上使用包管理工具。
如何使用Scoop包管理工具
Scoop从命令行安装程序更轻松。该工具提供以下好处:
- 权限弹出窗口。
- GUI 向导式安装程序。
- 安装大量程序造成的路径(Path)污染。
- 安装和卸载程序的意外副作用。
- 需要查找和安装依赖项。
- 需要执行额外的设置步骤才能获得工作程序。
我们将在以下小标题下讨论这个主题:
- 下载并安装 Scoop
- 使用 Scoop 包管理工具
- 使用Scoop(Scoop)安装或卸载程序
1] 下载并安装 Scoop
要在您的 Windows 10 设备上下载并安装Scoop,请执行以下操作:
- 按Windows key + X打开高级用户菜单。
- 然后点击键盘上的i 以启动 PowerShell。
- 在PowerShell控制台中,输入或复制并粘贴下面的命令,然后按 Enter(Enter)。
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
此命令是必要的,因为如果您在运行上述命令之前尝试运行下载和安装(download and install) Scoop所需的脚本,您可能会遇到错误消息“(Scoop)无法加载 PowerShell,因为已禁用运行脚本”。您还可以通过组策略(Group Policy)或注册表编辑器(Registry Editor)打开或关闭 Windows PowerShell 脚本执行(turn on or off Windows PowerShell script execution)。
- 接下来,一旦命令执行,点击键盘上的A并按 Enter。(A)
- 现在,您可以运行以下命令来下载并安装Scoop。
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
Scoop 安装到您的用户文件夹C:\Users\USERNAME\scoop – 由该实用程序下载和安装的应用程序可以在C:\ProgramData\scoop目录中找到。默认情况下,Scoop会下载可移植版本的程序(portable versions of programs)。
2]使用Scoop(Use Scoop)包管理工具
现在您已在 Windows 10 设备上安装了Scoop ,在(Scoop)PowerShell中,键入以下命令并按Enter以查看程序支持的命令列表。
scoop
要使用其中一个命令,请键入以下语法并按Enter:
scoop CommandName
如果您需要特定命令的帮助,可以通过键入以下语法查看其帮助部分,然后按Enter (Ente)r:
scoop help CommandName
3]使用Scoop安装(Install)或卸载程序
在使用Scoop(Scoop)在您的 Windows 10 设备上安装程序之前,您需要了解可供下载的应用程序列表。为此,请键入以下命令并按Enter:
scoop search
如上图所示,该工具将在其主列表中获取所有受支持程序的名称和版本号。Scoop 的列表称为buckets。如果要添加更多存储桶,可以运行以下命令:
scoop bucket add BucketName
访问此GitHub 页面(GitHub page) 以查看可用存储桶的列表。
现在您已经看到给定存储桶中的可用程序列表,要安装任何程序,只需运行以下命令:
scoop install ProgramName
可用程序的列表可能很长。因此,您可以使用下面的搜索命令找到特定的应用程序:
Scoop search ProgramName
要更新应用程序,您需要运行以下命令:
scoop install git
该命令将获取存储桶列表(用于比较您计算机上可用的版本)并将其保存为您计算机上的本地清单。
要卸载程序,请运行以下命令:
scoop uninstall ProgramName
要删除包含所有程序的存储桶,请运行以下命令:
scoop bucket rm BucketName
这就是如何在Windows 11/10Scoop包管理工具!
How to use Scoop package management tool on Windows 11/10
Package managers like Chocolatey, Ninite, Windows Package Manager (WinGet), to name but a few are perhaps the most popular package managers, and an efficient way to download programs without having to visit the software vendor site manually, download the files, and run the installer. In this post, we take a look at a similar app – Scoop, on how to use the package management tool on Windows 11/10.
How to use Scoop package management tool
Scoop installs programs from the command line with less hassle. The tool offers the following benefits:
- Permission popup windows.
- GUI wizard-style installers.
- Path pollution from installing lots of programs.
- Unexpected side-effects from installing and uninstalling programs.
- The need to find and install dependencies.
- The need to perform extra setup steps to get a working program.
We will discuss this topic under the following sub-headings:
- Download and install Scoop
- Use Scoop package management tool
- Install or uninstall programs using Scoop
1] Download and install Scoop
To download and install Scoop on your Windows 10 device, do the following:
- Press Windows key + X to open Power User Menu.
- Then tap i on the keyboard to launch PowerShell.
- In the PowerShell console, type in or copy and paste the command below and hit Enter.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
This command is necessary because if you try to run the script required to download and install Scoop before running the command above, you may encounter the error message “PowerShell cannot be loaded because running scripts is disabled“. You can also turn on or off Windows PowerShell script execution via Group Policy or Registry Editor.
- Next, once the command executes, tap A on the keyboard and hit Enter.
- Now, you can run the command below to download and install Scoop.
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
Scoop installs to your User folder C:\Users\USERNAME\scoop – and applications that are downloaded and installed by the utility can be found in the C:\ProgramData\scoop directory. By default, Scoop downloads portable versions of programs.
2] Use Scoop package management tool
Now that you have Scoop installed on your Windows 10 device, in PowerShell, type the command below and hit Enter to see the list of commands that are supported by the program.
scoop
To use one of the commands, type the syntax below and hit Enter:
scoop CommandName
If you need help with a particular command, you can view its help section by typing the syntax below and then hit Enter:
scoop help CommandName
3] Install or uninstall programs using Scoop
Before installing programs on your Windows 10 device using Scoop, you need to know the list of applications that are available for download. To do that, type the following command and hit Enter:
scoop search
As you can see from the image above, the tool will fetch the names and version numbers of all supported programs in its main list. Scoop’s lists are called buckets. If you want to add more buckets, you can run the command below:
scoop bucket add BucketName
Visit this GitHub page to view a list of available buckets.
Now that you have seen the list of available programs in a given bucket, to install any of the program, simply run the command below:
scoop install ProgramName
The list of available programs can be quite lengthy. So, you can find specific applications using the search command below:
Scoop search ProgramName
To update applications you will need to run the command below:
scoop install git
The command will fetch the bucket lists (used for comparing the version that is available on your computer) and save it as a local manifest on your computer.
To uninstall a program, run the command below:
scoop uninstall ProgramName
To remove a bucket with all its programs, run the command below:
scoop bucket rm BucketName
That’s it on how to use the Scoop package management tool on Windows 11/10!