I. Overview
Official Website Introduction Chocolatey is a software management solution unlike any other you've experienced on Windows. Chocolatey brings the concept of real package management, allowing you to version things, manage dependencies and install order, better inventory management, and other features. A straightforward understanding is that choco manages our commonly used software similar to the application store on mobile phones. We only need to enter a command to download and install the program to the windows system, which greatly simplifies the tedious steps of manual installation that we often use. .
- Official address: https://chocolatey.org/
- Installation documentation: https://chocolatey.org/install#individual
2. Installation
-
Open cmd or powerShell as an administrator, and enter the installation command (when installing as a non-administrator, an error message will be reported: requires Administrative permissions)
Order:
//设置choco安装目录的环境变脸 $env:ChocolateyInstall='E:\software\Chocolatey' [Environment]::SetEnvironmentVariable('ChocolateyInstall',$env:ChocolateyInstall,'Machine') //安装 Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
-
The installation is successful, enter choco to view the verification
Three, use
-
Commonly used commands
choco search xxx, find xxx installation package
choco info xxx, view xxx installation package information
choco install xxx, install xxx software
choco upgrade xxx, upgrade xxx software
choco uninstall xxx, uninstall xxx software -
Commonly used parameters
–install-directory=VALUE, modify the installation path of the specified program (only the pro version is available and the free version is invalid)
–version=value specifies the version -
Official program repository https://community.chocolatey.org/packages
-
Open the warehouse address to search and view the program you want to download (such as MongoDB-compass, which is a visualization tool for mongodb)
-
Enter the command to download and install choco install mongodb-compass
-
The default installation directory is the check-in program under C:\Program Files
-
Uninstall choco uninstall mongodb-compass