If you are a developer and use Windows laptop for development, Chocolatey can make your life a lot easier when it comes to packge management. Just like we have Homebrew for MacOS, Chocolatey is for Windows OS.
As per its official website:
Chocolatey is a software management solution unlike anything else you've ever experienced on Windows. Chocolatey brings the concepts of true package management to allow you to version things, manage dependencies and installation order, better inventory management, and other features.
I came across Chocolatey while trying to install Helm on my Windows laptop as I had to work on developing a Helm Chart for a service to install it on Kubernetes cluster.
So let's get started with installing Chocolatey on your Windows machine.
Installing Chocolatey
To install Chocolatey on your Windows machine, you would have to open the command prompt or PowerShell in Administrator mode.
Prerequisite:
If all these prerequisites are satisfied then let's start the installation.
Steps for Installation:
Open PowerShell in administartor mode. (How to open Command Prompt in Administrator Mode in Windows?)
With PowerShell, make sure that the property Get-ExecutionPolicy
is not Restricted. We would recommend using the value Bypass
to bypass the policy to get things installed or AllSigned
for quite a bit more security.
- Run
Get-ExecutionPolicy
. If it returns Restricted, then run Set-ExecutionPolicy AllSigned
or Set-ExecutionPolicy Bypass -Scope Process
.
Now run the following command:
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'))
This will start the installation. Once it is installed, you can verify it by running the command:
choco -?
If you see a lot of information about Chocolatey and its commands along with the version number printed at the bottom, then Congratulations! you have successfully installed Chocolatey on your machine.
Conclusion:
Once you have installed it successfully, you can now use it to install any software you want. You can find packages on its official website: https://chocolatey.org/packages
Chocolatey makes installing software and managin different versions of software super easy in Windows operating system and comes as a blessing for developers.
You may also like: