Skip to main content

Chocolatey - A Powerful Package Manager for Windows

Aakash Verma

What is Chocolatey?

Chocolatey or Choco as it is sometimes referred to, is a free, open-source package manager for windows servers that is very similar to Apt or DNF in the Linux realm. In other words, this is a program used for installing software via the Windows command line. It downloads a program, installs it, then it will check for the updates, and installs those updates automatically if needed.

Prerequisites

  • Windows 7 or later / Windows Server 2003 or later
  • PowerShell v2 or later

Installation

First, we need to run the Get-ExecutionPolicy. If it returns Restricted, then we need to run one of the two commands below.

Set-ExecutionPolicy AllSigned

or

Set-ExecutionPolicy Bypass -Scope Process

Now run the following command in the Windows shell.

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) 

If there are no errors, Chocolatey will be installed. We can verify the installation using the choco command.

Verify Installation

C:\WINDOWS\system32>choco

You will get to see the below output.

Chocolatey v0.10.15
Please run 'choco -?' or 'choco  -?' for help menu.

Excellent! Chocolatey is installed!

Installing Git

choco install git

Verify Git Version

git --version
Join the Innoskrit: Coder’s Obsession Discord Server!
Check out the Innoskrit: Coder’s Obsession community on Discord - hang out with 1256 other members and enjoy free voice and text chat.