Package management tool Chocolate - Win10 how to install Chocolate tool, quick start, advanced usage

How to install the Chocolate tool in Win10


T1: Quick start

>>Open method

insert image description here

>>Installation instructions

Paste the following command in cmd, hit enter, and wait for the installation:

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Wait for the online download and installation, as shown in the figure below, the download is successful
insert image description here

>> verify installation

Enter the command choco, display the chocolatey version number, indicating that the installation is successful

insert image description here

T2: Advanced usage

  1. introduce
  1. Choco command

    • search - search package choco search something
    • list - list packages choco list -lo
    • install - install choco install baretail
    • pin - pin the version of the package to prevent the package from being upgraded choco pin windirstat
    • upgrade - upgrade of the installation package choco upgrade baretail
    • uninstall - Uninstall the installation package choco uninstall baretail
    • Install Ruby Gem - choco install compass -source ruby
    • Install Python Egg - choco install sphynx -source python
    • Install IIS Server Features - choco install IIS -source windowsfeatures
    • Install the Webpi feature - choco install IIS7.5Express -source webpi
  2. Some commonly used commands

    1. list locally installed packages

      choco list –local-only

    2. List installed software on Windows system

      • choco list -li

      • choco list -lai

    3. Upgrade all installed packages

      choco upgrade all -y

    4. Change the package installation path

      When Chocolatey installs the package, the default path is based on the default path of the system. If you want to modify the installation path, you can do this:

      • Execute the "Start/Run" command (or WIN + R), enter "regedit" to open the registry.
      • Expand the registry to the following branch [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion], find the string named "ProgramFilesDir" in the right window, double-click to change the value "C:\Program Files" to "D:\ ProgramFiles", after confirming to exit, you can change the installation path of commonly used software.
    5. Chocolatey's own upgrade

      • choco upgrade chocolatey

Guess you like

Origin blog.csdn.net/qq_33704787/article/details/126089674