Skip to main content

Troubleshoot

Fix Ollama command not found

“Ollama is not recognized,” command not found: ollama, or a missing command in an editor terminal means that shell cannot find the executable. It does not establish that the model download, GPU, or Ollama server is broken. Check installation and the terminal's search path first.

Symptoms

The terminal reports that ollama is not recognised or that the command was not found.

Check first

Ollama is not installed or installation did not finish. The open terminal has not picked up the new command path.

First fixes

Confirm that you installed Ollama on the computer and operating system where this terminal is running. Close the terminal completely and open a fresh one. Restart an editor if its integrated terminal inherited the old environment.

Stop and switch when

The computer is managed and installation requires administrator approval. The installer or executable came from an unrecognised source.

Quick diagnosis

“Ollama is not recognized,” command not found: ollama, or a missing command in an editor terminal means that shell cannot find the executable. It does not establish that the model download, GPU, or Ollama server is broken. Check installation and the terminal's search path first.

This guide suits a desktop user trying the ollama command for the first time, or someone whose command stopped working after installation, an update, or changing terminals.

First three checks

  1. Confirm that you installed Ollama on the computer and operating system where this terminal is running.
  2. Close the terminal completely and open a fresh one. Restart an editor if its integrated terminal inherited the old environment.
  3. Run ollama --version. If it still cannot find the command, use the operating-system checks below.

A version number proves that the shell can run the command. A later “cannot connect to Ollama” error is a separate service problem, covered in model loading checks.

Windows: check the installed executable

In PowerShell, run:

Get-Command ollama

For the standard installer, Ollama's binaries are under %LOCALAPPDATA%\Programs\Ollama. You can test the executable directly:

& "$env:LOCALAPPDATA\Programs\Ollama\ollama.exe" --version

If that prints a version while ollama --version fails, the executable exists but this shell's PATH does not contain the installation directory. Open Windows' Edit environment variables for your account, inspect the user Path, and add the existing Ollama program folder if missing. Keep the other entries. Open a new terminal after saving the change.

If the direct path does not exist, check the installer you used and account under which it was installed. A standalone ZIP must be extracted before use and does not guarantee the same location as the desktop installer. Use the official Windows instructions rather than downloading a similarly named executable from an unrelated site.

PowerShell, Command Prompt, WSL, and an SSH session do not all share the same installed programs. Installing the Windows app does not create a Linux ollama executable inside WSL. Decide which environment you intend to use before reinstalling anything.

For the standard desktop installation, drag Ollama into Applications and launch it. Ollama's first-run flow offers to install its command-line link in /usr/local/bin; complete that step if you want Terminal access.

Check the command location:

command -v ollama

If the app is installed in Applications but the command is missing, test its bundled executable:

/Applications/Ollama.app/Contents/Resources/ollama --version

If that works, complete the app's command-link installation and check that your shell can search the link's directory. Reopen Terminal after a change. A custom app location requires the corresponding actual path; copying the example does not locate an app stored elsewhere.

Linux: separate the command from the service

Run command -v ollama. If it returns nothing, check whether you installed Ollama in this Linux environment. Follow the Linux setup guide for the official installation route.

If you installed a downloaded binary in a custom folder, use its full path to check the version, then add that specific folder to your user's shell search path if appropriate. A running systemd service can find its own executable even when an interactive shell cannot. Conversely, a working command does not prove the service is running.

Avoid starting repeated ollama serve processes to fix a missing command. A server cannot repair the terminal's search path, and duplicate servers can produce a port conflict.

Confirm the repair

In a newly opened terminal, run ollama --version, start the installed app or intended service, and run ollama list. A version followed by a model table means both the command and server are reachable. An empty table is normal before downloading a model.

Use the Ollama installation guide to download and run a small model. If the command works but the response fails, preserve the exact new error and diagnose that error. Changing GPU drivers or deleting model files is not a useful response to a command that the shell cannot locate.

Sources

Still stuck?

Recheck the selected model against the machine before adding more configuration changes.