What is chocolate?
Chocolatey or Choco as it is sometimes known is a free and open source package manager for Windows very similar to Apt or DNF in the domain of Linux. In other words, this is a program used to install software through the Windows command line. It downloads a program, installs it, checks for updates, and automatically installs those updates if needed. Those who use Linux are quite familiar with package management systems like this one.
Some ask: "Why should we choose to use a program like this when we can simply download the .exe or .msi software and install the program ourselves?”
This is an excellent question. Here are several solid answers.
- When we install a new operating system and want to use several programs, we need to find each program installer, download it, install it, and regularly check for updates. Chocolatey package manager works by itself, when using automatic mode.
- Instead of looking for an executable installer, we can install the program using the Chocolatey package manager and complete everything using the command line. It's much more comfortable and faster.
- We will be able to comfortably control the versions of the application that we need. Most of the time when we go to download an executable for the application it downloads the latest version for us and we don't always need the latest version.
- Chocolatey provides clear and simple commands that are used almost identically in all package management systems.
previous requirements
- Windows 7 o posterior / Windows Server 2003 o posterior
- PowerShell v2 ou posterior
- .NET Framework 4 o posterior
(Also, setup will attempt to install .NET 4.0 if you haven't already installed it.)
Installation
Let's go to the installation. There are two options for installing Chocolatey. We can install Chocolatey from the command line or from PowerShell. The option to use cmd is mostly used for Windows and PowerShell to run scripts. In this case, we can run cmd and powershell, but as an administrator, for this installation.
To use:
inspect thechocolate install scriptbefore running it to ensure safety. Chocolatey already knows that its scripts are safe, but by default you should verify the security and content of any unknown script before downloading and running it from the Internet. This installation downloads a remote PowerShell script and runs it on your machine. We take security very seriously.
Install using Powershell
When installing software via PowerShell, we need to ensure that the locationGet-ExecutionPolicyis not set to restricted. Chocolately suggests usingDerivationto ignore the policy to install things orall signedfor greater security.
First, we need to run theGet-ExecutionPolicy🇧🇷 if you come backRestricted, so we need to run one of the two commands below.
Establecer-ExecutionPolicy AllSigned
O
Set-ExecutionPolicy Bypass -Proceso de scope
Now run the following command in the Windows shell.
Set-ExecutionPolicy Bypass -Alcance Processo -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((Nuevo-Objeto System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
If there are no errors, Chocolatey will be installed. We can verify the installation using thecollidedoChocolate-?domain.
Install using Windows Cmd Shell
First, we need to make sure we're using an administrative shell.
Then copy the following command to thecmd.exeConcha.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat Nenhum -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"
And then press enter.
The installation should look something like this.
Microsoft Windows [Version 10.0.18363.900](c) 2019 Microsoft Corporation. All rights reserved.C:\WINDOWS\system32>@"%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 "Getting the latest version of the Chocolatey package for download. Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.15. Extracting C:\Users\user\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\user\AppData\Local\Temp\chocolatey\chocInstall...Installing chocolatey on this machine Creating ChocolateyInstall as an environment variable (intended for 'Machine') Setting ChocolateyInstall to 'C:\ProgramData\chocolatey' WARNING: You will probably need to close and reopen your shell before you can use choco. Restricting Write Permissions for Administrators We are configuring Chocolate and the package repository. The packages themselves go to 'C:\ProgramData\chocolatey\lib' (i.e. C:\ProgramData\chocolatey\lib\yourPackageName). A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin' and points to an executable at 'C:\ProgramData\chocolatey\lib\yourPackageName'. Creating Chocolatey folders if they don't already exist. WARNING: You can safely ignore errors related to missing registry files when upgrading from a version of Chocolatey prior to 0.9.9. "Could not find batch file" is also safe to ignore. the system cannot find the file specified' is also safe. WARNING: Do not configure tab completion: profile file does not exist at 'C:\Users\user\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.Chocolatey (choco.exe) is now ready. You can call choco from anywhere, command line or PowerShell by typing choco. run failure /? for a list of functions. It may be necessary to shut down and restart powershell and/or consoles before using choco. Make sure the chocolatey commands are in the path. Make sure chocolatey.nupkg is in the lib folder C:\WINDOWS\system32>
check the installation
To check if Chocolatey is installed, we'll use the choco command.
C:\WINDOWS\system32>choco Chocolatey v0.10.15 Run 'choco -?' or 'shock-?' to the help menu.
C:\WINDOWS\sistema32>
Great! Chocolate is installed!
Advanced examples for installing Chocolatey
Install the Chocolatey Graphical User Interface (GUI)
Once Chocolatey is installed it is helpful to install the GUI version if you wish. Use the following command for installation.
choco install chocolateygui
Install Chocolatey behind a proxy
If you need to install Chocolatey behind a proxy, use the following Windows Cmd command.
@powershell -NoProfile -ExecutionPolicy Bypass -Command "[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; iex ((New-Object System.Net.WebClient).DownloadString(' https://community.chocolatey.org/install.ps1'))" && SET PATH="%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
If you use Windows PowerShell, make sureGet-ExecutionPolicyis at least configured toRemoteSignedand run the following command.
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; iex ((Nuevo-Objeto System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Loschocolate documentationoffers additional options for more complex configurations of this type of installation.
Other software to install with Chocolatey
Chocolatey is useful for installing various software packages. Here are some to get you started.
Google Chrome Browser
The following command is used to install Google Chrome with Chocolatey.
cuttlefish install chrome
git
Use the following command to install the Git for Windows command line client (cli).
choco install git
GitHub
This command installs GitHub, the official GUI-based client for Git.
cuttlefish install github
putty
The following command installs the popular open source SSH client, Putty.
cuttlefish install mass
VLC
Use this command to install VLC, the open source media player.
choco install vlc
Basic chocolate commands
Now let's look at some of the basic commands for using Choco. Choco commands can be used in Windows cmd shell and PowerShell.
install program
To install a specific program, use the following command.
choco install <pkg|packages.config> [ ] []</pkg|packages.config>
For example:
cuttlefish install chrome
For a complete list of installation options, visit the Choco installation page or run the following command.
Choco install -h
update program
To update a program, we will use the following command.
choco update <pkg|all> [ ] []</pkg|all>
For example:
сhoco update chrome
Update all programs
To update all programs, we need to use the following command.
flake <pkg|all> [ ] []</pkg|all>
O
choco updates all
If you noticed, theBowlThe command is an alternative to using thecuttlefish updatedomain.
search for a program
To find a necessary program to download and install, we can enter the following command.
cuttlefish fetch chrome
View Installed Programs
Using the following command, you can see which programs are already installed using Choco.
choco list --local-only Chocolatey v0.10.15 chocolatey 0.10.15 chocolatey-core.extension 1.3.3 kubernetes-cli 1.18.2 Minikube 1.10.1 vscodium 1.38.0 5 pacotes instalados.
C:\WINDOWS\sistema32>
Update Chocolate Milk
We can update the Choco program itself using this command.
chocolate chocolate update
It is important to do this periodically because in previous versions bugs can be detected and it is necessary to correct them so that there are no vulnerabilities.
Install the Chocolate GUI
If anyone is not comfortable using the command line, we can install the Chocolatey GUI using this command.
choco install chocolateygui
conclusion
As you can see, using Chocolatey is very simple. Overall, Chocolatey is a great tool in your system administration toolbox. It is reliable, definitive and constantly updated. It is an exceptional product.
Do you need to set up a Windows server to use with Chocolatey? Liquid Web Windows Options forVPS Hosting,Dedicated Cloud Servers, youdedicated serversprovide what you need for development or production workloads.Contactour sales team for additional details.
FAQs
How install Chocolatey on Windows? ›
Install via Command Line
Press the Windows key and type "cmd". Select the Run as administrator option. Wait for the installation process to finish to start using Chocolatey. Note: Make sure to close and reopen the shell before using Chocolatey to ensure all the environment variables are loaded correctly.
Chocolatey Client Software
By default, the Chocolatey client is installed into the C:\ProgramData\Chocolatey local directory on the Windows computer.
- Step 0: Decision: why not using VS Code or WebStorm in your Browser?
- Step 1: Install Chocolatey on Windows. ...
- Step 2: Uninstall NodeJS, if installed.
- Step 3: Install NodeJS.
- Step 4: Check NodeJS Version.
- Step 5: Check NPM Version.
- Step 6 (optional): Install Angular CLI.
- Done.
If you are an organization and you are using Chocolatey in the recommended way (internal repositories using packages that use internal resources only), Chocolatey is secure and reliable. Using the community repository (https://community.chocolatey.org/packages) is only as secure as the packages that you are using.
Is it okay to install Chocolatey? ›Chocolatey is a Windows Package Manager, it manages packages. You don't need Chocolatey in order to do web development. Having Chocolatey makes the automated installation and updating of the applications on your machine easier.
Is it good to use Chocolatey? ›Chocolatey helps good developers and system administrators become outstanding developers/sysadmins. Chocolatey goes to eleven. Chocolatey is something you need if you've ever installed, upgraded, or removed software on Windows. It is an existing, proven, project that was started in 2011.
How do you test if Chocolatey is installed? ›To verify that Chocolatey is installed, we will use the choco command. C:\WINDOWS\system32>choco Chocolatey v0. 10.15 Please run 'choco -? ' or 'choco -?
Does Chocolatey have a GUI? ›Chocolatey GUI is a WPF application that allows the installation, uninstallation, updating, and searching for Chocolatey Packages. It is intended as a replacement for the Chocolatey CLI for those that prefer interacting with an application, rather than with commands.
Does Chocolatey require admin? ›Administrative Access Required. Runs a process with administrative privileges. If -ExeToRun is not specified, it is run with PowerShell.
How do I know if Windows is installed correctly? ›Check the geometry of the window – first, if the edges of the sash are visually parallel to the edge of the frame. Then check that the diagonals of the windows are equal. A properly installed window should work properly without any adjustments.
How to install Chocolatey on Windows using PowerShell? ›
- Click Start and type “powershell“
- Right-click Windows Powershell and choose “Run as Administrator“
- Answer Yes when prompted.
- Close and reopen an elevated PowerShell window to start using choco.
js and NPM installations on Windows are relatively simple. You can install both from a download link. First, go to the Node installation page and download the installer. Choose the operating system you're using, and then go from there.
How to install NPM in Windows? ›Visit the official node. js site https://nodejs.org/en/download/ and click on Windows installer to download the necessary software in your system. The installer contains the NPM package. Based on the system you want to install, choose 32-bit installer or 64-installer and proceed.
Should I delete Chocolatey? ›As a general rule of thumb, yes, it is "safe" to uninstall Chocolatey. Chocolatey, for the most part, is simply a wrapper around the native EXE/MSI for the application that is being installed. As a result, removing Chocolatey, does not remove the installed applications.
Can I use Chocolatey at work? ›Yes, it is. Chocolatey carries a FOSS Apache 2.0 license, which is extremely business friendly. You can use Chocolatey and most of its infrastructure completely free. Chocolatey also has a business edition with features organizations need for better software management .
Who owns Chocolatey? ›Chocolatey was created by Rob Reynolds in 2011 with the simple goal of offering a universal package manager for Windows. Chocolatey is an open source project that provides developers and admins alike a better way to manage Windows software.
Does Chocolatey install Python? ›Chocolatey sometimes installs packages in unexpected locations. Python is a notable example. While it's typically installed in a top-level directory, e.g. C:\Python37 or in %PROGRAMFILES%, e.g. C:\Program Files\Python37, Chocolatey tends to install it under C:\ProgramData\chocolatey or C:\Tools.
Why is it called Chocolatey? ›The name is an extension on a pun of NuGet (from "nougat") "because everyone loves Chocolatey nougat".
Which is better scoop or Chocolatey? ›While Chocolatey seems to have a huge selection of packages including some windows updates, Scoop has a much smaller selection mainly focused on command-line tools. However, it can be argued that Scoop is focusing on a different type of setup than Chocolatey so package count may not be a good comparison.
What port does Chocolatey use? ›Chocolatey Central Management Service (24020): This port is used for communication between Chocolatey Agent on your endpoint and the Chocolatey Central Management (CCM) server.
What is Chocolatey used for? ›
What is Chocolatey? Chocolatey is a command line application installer for Windows based on a developer-centric package manager called NuGet. Unlike manual installations, Chocolatey adds, updates, and uninstalls programs in the background requiring very little user interaction.
What is Chocolatey made of? ›Chocolate is a natural product made of these ingredients:
Chocolate Liquor: Cocoa beans with their shells removed that have been fermented, roasted and ground until they liquefy. This liquid is made up of cocoa butter and cocoa solids; both are naturally present in the bean.
If you have installed Chocolatey package manager on Windows 10 before, then for Windows 11 the process is the same.
What is puppet Chocolatey? ›Chocolatey allows you to use non-centralized and private repositories and create your own packages. Puppet can install Chocolatey and packages, and all the configuration that goes along with Chocolatey as well — including custom sources and other features.
Where are Chocolatey apps stored? ›8.24, Chocolatey's default install location is C:\ProgramData\Chocolatey. This reduces the attack surface on a local installation of Chocolatey and limits who can make changes to the directory. You can install Chocolatey to Program Files if you feel that is a more appropriate place.
What is Chocolatey terraform? ›Chocolatey is a free and open-source package management system for Windows. Install the Terraform package from the command-line.
What is Chocolatey used for in Windows? ›Chocolatey is an open-source package manager for Windows. It builds on top of existing Windows technologies like PowerShell and NuGet. Chocolatey operates via command-line interface (CLI), which makes it easy to automate software installation and management.
How to install Choco on Windows 11? ›- Open PowerShell as an Administrator. ...
- To install the Chocolatey GUI all you need to do is enter the mentioned command. ...
- It will ask for your approval to install required packages. ...
- After installation you will get confirmation.
Installing applications using Chocolatey
If you want, you can also search for applications at the Chocolatey website using their search function, instead of in the terminal. The benefit is, you can copy the exact command to install the application you want from the website, and paste it at the terminal.
Should you decide you don't like Chocolatey, you can uninstall it simply by removing the folder (and the environment variable(s) that it creates).
Can I install APK files on Windows 11? ›
Windows 11 has confirmed to support running Android apps in its new versions in February 2022, and now the public is able to install APK on Windows 11 and run favored Android apps through Microsoft Store.
What is the latest version of Chocolatey? ›- chocolatey.1.2.1.nupkg. 4.25 MB Dec 7, 2022.
- chocolatey.v1.2.1.tar.gz. 3.59 MB Dec 7, 2022.
- Dec 6, 2022.
- Dec 6, 2022.