If you ever worked on a Linux or ubuntu machine then you must have heard about YUM and APT-GET package manager which are used to install various packages (Software) in respective operating systems.
Similarly, have you ever used any package manager to install packages or software in WINDOWS? (let’s not talk about PowerShell now 😊)
If not then I will introduce to you a new package manager called chocolatey. Yes, you head it right! Let’s explore a bit more on this.
What is Chocolatey?
Chocolatey is a package manager for Windows (like apt-get or yum but for Windows).A framework for quickly installing applications and tools that you need. It is built on the NuGet infrastructure currently using PowerShell as its focus for delivering packages from the repository to your computer.
You can install software like “installers, zip archives, runtime binaries, internal and 3rd party software” using a packaging framework that understands both versioning and dependency requirements.
With all of this in mind, think of Chocolatey as a framework
Want to explore more, visit https://chocolatey.org
How to install?
Before you proceed for installation, below are the requirements you should consider.
- Windows 7+ / Windows Server 2003+
- PowerShell v2+ (Not PowerShell Core yet though)
- .NET Framework 4+ (the installation will attempt to install .NET 4.0 if you do not have it installed)
Now let’s INSTALL
- First, ensure that you are using an administrative shell
- Copy the text specific to your command shell – cmd.exe or powershell.exe. (Text/Command mentioned below)
- Paste the copied text into your shell and press Enter.
- Wait a few seconds for the command to complete.
- If you don’t see any errors, you are ready to use Chocolatey! Type choco or choco -? now
Install with cmd.exe (open in admin mode)
@"%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"
Install with PowerShell (open in admin mode)
With PowerShell, there is an additional step. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
I prefer PowerShell, so below is the reference snip 🙂
After successful installation you will get something like below:
Now let’s run our first command to check the chocolatey version
Congratulations!! You have successfully installed Chocolatey.
Please inspect https://chocolatey.org/install.ps1 prior to running any of these scripts to ensure safety. We already know it’s safe, but you should verify the security and contents of any script from the internet you are not familiar with.
The syntax to install a package is “choco install <package_name>”
Now let’s try to install a package called “VLC”.
After successful installation, you will see a message like below
That’s it for now folks! There are a lot of things you can do with chocolatey. We will discuss in later posts. Till the time visit below website to explore more.
If you like the post, please share it further! Thank you