Install Chocolatey or Choco on Windows

This guide intends to teach you to Install Chocolatey or Choco on Windows. Also, you can use this instruction to Install Chocolatey on Windows Server.

Introduction To Chocolatey

Chocolatey or Choco is a free open-source package manager for Windows. It can help you install, manage, and upgrade software on your desktops or servers.

It can help make life easier than finding the MSI or EXE file needed to install software and then walking through those installation wizards.

At its core, Chocolatey is an open-source tool, that anyone can contribute to and help evolve. It is also free at the point of use, but there are paid versions for those that may need some additional features or are using the product in their business environment.

Steps To Install Chocolatey or Choco on Windows

To complete this guide, you must log in to your Windows Client or Windows Server and follow the steps below.

Note: You need to have Windows 7 or later / Windows Server 2003 or later.

You can install Choco by using:

  1. PowerShell
  2. CMD

Installation Steps of Chocolatey with PowerShell on Windows

First, you need to run your PowerShell as an administrator. To do this, you can check this guide on Run PowerShell as Administrator on Windows.

Then, you must be sure that the local Get-ExecutionPolicy is not set to restricted. To do this, run the following command from your PowerShell:

Set-ExecutionPolicy AllSigned

If it returns Restricted, you need to run the command below:

Set-ExecutionPolicy Bypass -Scope Process

At this point, you can use the following command to install Chocolatey:

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')) 

When your installation is completed, you will get the following output:

Output
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.

Restart your PowerShell again, and verify your Choco version on Windows with the command below:

choco
Output
Chocolatey v1.3.1
Please run 'choco -?' or 'choco <command> -?' for help menu.

Installation Steps of Chocolatey with CMD on Windows

Another way to install Choco is to use the Windows CMD. Open your CMD as an administrator and run the command below:

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

When your installation is completed, restart your CMD again, and verify your Choco version on Windows with the command below:

choco

How To Use Chocolatey on Windows

Choco commands can be used in both the Windows cmd shell and in PowerShell.

To install a program with Choco, you can use the command below:

choco install package-name

For example:

choco install git

To update a program, you can use the following command:

choco upgrade package-name

For example:

choco upgrade git 

Also, you can update all programs with the following command:

choco upgrade all

Note: The cup command is an alternative to using the choco upgrade command.

To find a program for downloading and installation, you can use the following command:

choco search package-name

You can easily use the command below to see which packages are installed with Choco:

choco list --local-only

Update Chocolatey or Choco on Windows

you can update the Choco program itself by using the following command:

choco upgrade chocolatey

It is important to do this periodically because in previous versions, errors may be detected, and they need to be fixed so that there are no vulnerabilities.

Install Chocolatey or Choco GUI on Windows

Those who are comfortable with the graphical interface can install Choco GUI by using the command below:

choco install chocolateygui

During the installation, you will be asked some questions, and answer them by pressing A.

When your installation is completed, you can search for Chocolatey from your search bar. You should see the Choco GUI:

Chocolatey GUI Windows

For more information, you can visit the Chocolatey Docs page.

Conclusion

At this point, you have learned to Install Chocolatey or Choco on Windows.

Hope you enjoy it. For more articles, you can visit the Blog page.

2 COMMENTS
  1. I do not even know how I ended up here, but I thought this post was great. I do not know who you are but definitely you’re going to a famous blogger if you aren’t already 😉 Cheers!

  2. I need to to thank you for this very good read!! I absolutely loved every little bit of it.I have got you book marked to look at new stuff you post…

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular