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.

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 see | Possible cause | Fix |
|---|---|---|
| Mac: command not found right after dragging Ollama to Applications | The app has not been opened yet, or you declined its request to add the command | Open the Ollama app and accept the prompt |
| Mac: Ollama.app is somewhere other than Applications | The command link points to the wrong place, or does not exist | Put the app in Applications, or link the command yourself |
| Linux: command not found after a manual install | The ollama file is not in a folder your shell searches | Check /usr/bin/ollama, or use the install script |
| Command works, but says it cannot connect | A different problem: the Ollama server is not running | Start 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.
- Make sure Ollama.app is in your Applications folder, the location the docs prefer.
- Open the Ollama app. If it asks to add the command, accept.
- 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
- Ollama for macOS, Ollama docs, opened November 24, 2026
- Ollama for Linux, Ollama docs, opened November 24, 2026
- Ollama install script, read as text, opened November 24, 2026
Next steps: Install Ollama and run your first model · The same error on Windows

