Last updated: Apr 4, 2024
Reading time·3 min

The error "'choco' is not recognized as an internal or external command" occurs for 2 main reasons:
chocolatey installed on your machine.chocolatey added to your system's PATH environment variable.
'choco' is not recognized as an internal or external command, operable program or batch file The term 'choco' is not recognized as the name of a cmdlet.
First, make sure you have Chocolatey installed:

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

choco to make sure Chocolatey is installed.
Verify that chocolatey is installed by running the following command.
choco
Note that your shell should still be run using elevated permissions.
choco command again.chocolatey to your PATH environment variable.Click on the Search bar and type "chocolatey".
Right-click on the "chocolatey" application and click "Open file location".


For me the location is C:\ProgramData\chocolatey\bin and it will likely be
similar to your path.
chocolatey.exe (executable) file.



Click on "OK" twice to confirm the changes.
Close all instances of Command Prompt and PowerShell.
You might also have to restart your PC, but that's not always necessary.
To run PowerShell as an administrator:

Verify that chocolatey is installed by running the following command.
choco

You can learn more about the related topics by checking out the following tutorials: