How to Fix "ollama: command not found" on Mac and Linux

A silver laptop with its screen off on a wooden desk, next to a mug of tea, reading glasses and a notebook with a pen.

By Annie Vane · Fixes · Local · Docs-only · Checked November 24, 2026

How do I fix "ollama: command not found" on a Mac or Linux?

Your terminal cannot find the ollama program in any folder on its PATH, the list of folders it searches for commands. On a Mac, open the Ollama app once so it can add the command to /usr/local/bin; on Linux, rerun the official install command, which puts ollama in a folder that is already on your PATH.

Field card: ollama: command not found. Your shell cannot find ollama on its PATH; on a Mac, open the Ollama app once so it adds a link in /usr/local/bin; on Linux, rerun the official install command; check with which ollama.

This guide follows one reader: someone who installed Ollama, opened Terminal, typed ollama run and got a "command not found" error. On Windows the same problem reads differently; see our fix for "ollama is not recognized".

Symptom, cause and fix

What you seePossible causeFix
Mac: command not found right after dragging Ollama to ApplicationsThe app has not been opened yet, or you declined its request to add the commandOpen the Ollama app and accept the prompt
Mac: Ollama.app is somewhere other than ApplicationsThe command link points to the wrong place, or does not existPut the app in Applications, or link the command yourself
Linux: command not found after a manual installThe ollama file is not in a folder your shell searchesCheck /usr/bin/ollama, or use the install script
Command works, but says it cannot connectA different problem: the Ollama server is not runningStart the app, or run ollama serve

First, check whether the command exists

Open a new terminal window and run:

which ollama
echo $PATH

If which ollama prints a path, the command is installed. If it prints nothing, follow the steps for your system below. The second line shows the folders your shell searches, separated by colons.

How to fix it on a Mac

Ollama's Mac app carries the command inside itself. Its docs say that on startup, the app checks that the ollama command is on your PATH and, if not, asks permission to create a link in /usr/local/bin. Ollama's docs require macOS Sonoma (version 14) or newer.

  1. Make sure Ollama.app is in your Applications folder, the location the docs prefer.
  2. Open the Ollama app. If it asks to add the command, accept.
  3. Open a new Terminal window and run ollama -v.

If you missed the prompt, create the link yourself. This is the same command Ollama's install script uses for a Mac install:

sudo mkdir -p /usr/local/bin
sudo ln -sf "/Applications/Ollama.app/Contents/Resources/ollama" "/usr/local/bin/ollama"

If you keep Ollama.app somewhere else, the docs say to make sure Ollama.app/Contents/Resources/ollama, or a link to it, can be found in your path. Change the first path in the command to match.

How to fix it on Linux

The simplest fix is to run the official install command again:

curl -fsSL https://ollama.com/install.sh | sh

It runs a script from ollama.com, so read it first if you prefer. The script picks the first of /usr/local/bin, /usr/bin or /bin that is on your PATH, and installs Ollama so that the ollama command ends up in that folder.

If you installed by hand, the manual install steps extract the files into /usr, which puts the command at /usr/bin/ollama. Check it is there:

ls -l /usr/bin/ollama /usr/local/bin/ollama

If neither file exists, Ollama is not installed in either place; use the install script above.

Errors that look similar but are not

If ollama -v works but other commands complain that they cannot connect, the command is fine and the Ollama server is not running. On a Mac, open the app. On Linux, the docs' manual steps start it with ollama serve, and an install set up as a service runs it with systemctl. Our Ollama install guide shows how to check that it is running.

Common questions

Where does Ollama put the command on a Mac?

The program itself lives inside the app, at Ollama.app/Contents/Resources/ollama. The app or the install script adds a link to it at /usr/local/bin/ollama, which is what your terminal runs.

Do I need to reinstall Ollama to fix this?

Usually not. On a Mac, opening the app or creating the link is enough. On Linux, rerunning the install script puts the command back in place.

Which Macs can run Ollama?

Ollama's docs list macOS Sonoma (version 14) or newer, on Apple M-series Macs, which get CPU and GPU support, or Intel Macs, which run on the CPU only. On an older macOS version, update macOS before installing.

Verdict

On a Mac, open the Ollama app from Applications and accept its prompt, then open a new Terminal window. On Linux, rerun the install command. If ollama -v then prints a version, you are done.

Sources

Next steps: Install Ollama and run your first model · The same error on Windows

Spotted a mistake? Tell us

Annie Vane, author of Local AI Scout

ABOUT THE AUTHOR

Annie Vane

Annie edits Local AI Scout and tests the models she covers on her own 24 GB M5 MacBook Air. She has worked in search, affiliate marketing and digital publishing for national newspapers and magazine groups.

More about Annie and how we test

Keep exploring: Apps · Models · All guides

Good finds.
Less noise.

The Scout Letter: new guides, app reviews and "Can I run it?" checks on new models, in one short email every two weeks. No spam.

Free to join. Unsubscribe with one click.