Func Command Not Found Azure Functions Core Tools

A developer on a customer-notification project joined our team on a Monday. By lunch he had cloned the repo, installed the Azure Functions extension in his editor, and typed func start. The terminal answered with “func is not recognized” and nothing else. His teammate had the same code running in minutes, so the difference had to be local setup.

The func command not found Azure Functions Core Tools error is almost always one of five things: the tools are not installed, the install folder is not on your PATH, a stale terminal never reloaded, two installs are fighting, or a policy blocks the script. I have fixed all five on laptops, build agents, and WSL. This guide shows how to diagnose the cause, install the tools the right way on each operating system, verify the result, and keep your pipelines from hitting it again.

Why the func Command Not Found Error Happens

Azure Functions Core Tools is the local runtime and command-line tool for building, running, and publishing Azure Functions. Its binary is named func (or func.exe on Windows). When your shell says the command is not found, it searched every folder in your PATH and found no file with that name. The PATH is a list of folders your operating system checks when you type a command.

Microsoft’s own guidance notes that the recommended install method depends on your operating system, and that the Visual Studio Code extension installs and updates Core Tools through npm. That detail explains many mixed setups. One person installs with an MSI, the editor installs with npm, and the two end up in different folders.

Match the Symptom to the Cause

What you seeLikely causeFix
“func is not recognized” right after installTerminal has an old PATHOpen a new terminal or restart the editor
“command not found: func” on Linux or macOSNot installed, or npm prefix not on PATHInstall with brew or apt, or fix the npm path
func works in one terminal but not anotherDifferent PATH per shellCompare where func or which func in each
Old version runs after upgradeMSI and npm installs conflictRemove one install
“running scripts is disabled”PowerShell execution policyAdjust policy for your user
Works locally, fails in CIAgent has no Core ToolsInstall in the pipeline

Pro Tip: In my experience, 80 percent of these tickets end with “close the terminal and open a new one.” I always try that first, because PATH changes never reach windows that were already open.

Diagnose Before You Reinstall

Do not reinstall blindly. Run three quick checks to see what your machine actually has.

func --version

This prints the Core Tools version if the command resolves. A version number such as 4.x means the tools work and your problem is something else. Version 4 of Core Tools matches version 4 of the Functions runtime, which is what new projects should use.

node --version
npm --version

These show whether Node.js and npm exist. You only need them if you install through npm, but the VS Code extension path depends on them. If you need to set up Node-based projects, see how to create Node.js Azure Functions.

Find Where func Lives (or Doesn’t)

On Windows, use PowerShell:

Get-Command func -ErrorAction SilentlyContinue
where.exe func

Get-Command asks PowerShell where it would run func from. where.exe func lists every match on the PATH. Two results from different folders often mean you have both an MSI install and an npm install. Microsoft warns that if both exist, the MSI takes precedence on PATH and can cause version conflicts.

On macOS and Linux, use:

which -a func
echo "$PATH"

which -a lists every func it finds, and echo "$PATH" prints the folders your shell searches. If func exists but its folder is missing from the PATH output, you have a PATH problem rather than a missing install.

This guide on Azure Functions Core Tools explains what the tool does if you are new to it. If an editor insists the tools are missing, also read you must have Azure Functions Core Tools installed.

Pro Tip: I paste the output of where func or which -a func into every support ticket. One line of output shows more than ten minutes of guessing.

Fix func Command Not Found on Windows

Windows has the most install options, which is why it has the most conflicts. Pick one method and stick with it.

Option 1: Install with npm

Use this if you work mainly in Visual Studio Code. Make sure Node.js is installed first, ideally a current LTS release.

npm install -g azure-functions-core-tools@4 --unsafe-perm true

Here is what each part does:

  • -g installs the package globally, so func is available from any folder.
  • @4 selects version 4 of Core Tools.
  • –unsafe-perm true lets npm’s post-install script download the platform binary. Microsoft’s current docs still show this flag for Windows.

Then close every terminal and editor window, and open a new one. Run func --version. If it still fails, npm’s global folder is missing from your PATH. By default it is %APPDATA%\npm.

$NpmGlobalPath = Join-Path $env:APPDATA "npm"
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")

if ($UserPath -notlike "*$NpmGlobalPath*") {
[Environment]::SetEnvironmentVariable("Path", "$UserPath;$NpmGlobalPath", "User")
}

This script reads your user-level PATH, checks whether the npm folder is already there, and appends it only if missing. It changes your user environment, not the system PATH, so it needs no admin rights. Open a new terminal afterward. If you want npm basics first, read npm is not recognized as the name of a cmdlet.

Option 2: Install with winget or Chocolatey

If you prefer a package manager, use one of these instead of npm:

winget install Microsoft.Azure.FunctionsCoreTools

winget is the Windows Package Manager, and Microsoft.Azure.FunctionsCoreTools is the package ID. Chocolatey users can run choco install azure-functions-core-tools. Package managers update the PATH for you, but you still need a fresh terminal.

Fix the “Running Scripts Is Disabled” Error

npm installs command shims written as PowerShell scripts. If your execution policy blocks them, you will see an error about scripts being disabled. This guide covers it in detail: cannot be loaded because running scripts is disabled on this system.

Get-ExecutionPolicy -List
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

The first line shows the policy at each scope. The second sets RemoteSigned for your user only, which lets local scripts run while requiring signatures on downloaded ones. Warning: this changes a security setting. On managed company laptops, ask your IT team before changing it, because Group Policy may override it anyway.

Clean Up Conflicting Installs

If where.exe func showed two paths, remove one. To drop the npm copy:

npm uninstall -g azure-functions-core-tools

This removes only the global npm package. To remove an MSI install, use Add or remove programs. Then reinstall one method. You can also read how to uninstall Azure Functions Core Tools cleanly, and the walkthrough on installing Core Tools for Visual Studio Code.

Pro Tip: I standardize each team on one install method and write it in the README. Mixed installs create “works for me” bugs that cost hours.

Fix func Command Not Found on macOS and Linux

Unix systems have cleaner package managers, but PATH and permission issues still appear.

macOS with Homebrew

brew tap azure/functions
brew install azure-functions-core-tools@4

The first command adds Microsoft’s Homebrew tap, a package source. The second installs version 4. If you are upgrading a machine that previously had version 2 or 3, run brew link --overwrite azure-functions-core-tools@4 so the new version takes over the func name.

Ubuntu and Debian with APT

First add Microsoft’s package repository and signing key by following the current Microsoft instructions for your distribution. Then:

sudo apt-get update
sudo apt-get install azure-functions-core-tools-4

apt-get update refreshes your package index, and it matters. Package versions change, and a stale index can produce 404 errors during install. This is a common cause of failures in CI workflows. If you also need the Azure CLI on Ubuntu, see how to install Azure CLI on Ubuntu.

npm Without Admin Rights

On shared machines, Cloud Shell, or locked-down environments, you may not have root access. Point npm at a folder in your home directory:

mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
npm install -g azure-functions-core-tools@4 --unsafe-perm true

Each line has a job. The first creates a personal global folder. The second tells npm to install global packages there. The third adds that folder’s bin directory to your PATH permanently, and source reloads the shell. The last installs the tools without sudo. On zsh, replace ~/.bashrc w