Updated ยท Sources & corrections
In this guide
- 1. Check the host before installing
- 2. Download and inspect the official installer
- 3. Verify the executable, service and endpoint separately
- Bash says ollama: command not found, but the service may still run
- 4. Download deliberately, then try one local model
- 5. Check GPU support without copying overrides
- 6. Read logs and manage configuration reversibly
- 7. Keep storage and frontend routing explicit
- Sources and verification scope
This guide covers a native Ubuntu or Debian-style host administered with sudo and systemd. Containers, WSL installations without a running systemd manager and manually unpacked binaries need their own process lifecycle. Keep the initial test on loopback so network routing does not obscure installation faults.
1. Check the host before installing
Record the OS, CPU architecture and available storage. Choose a model only after checking its weights, memory needs, context and licence. There is no single disk or RAM minimum that fits every checkpoint. Our Ollama setup and model-sizing guide explains the tradeoffs.
cat /etc/os-release
uname -m
df -h
Prepare the download and extraction tools on an Ubuntu/Debian host:
sudo apt update
sudo apt install curl zstd
This changes installed packages. Review the package-manager prompt. Current installer source handles x86_64 and ARM64 and requires zstd when downloading its compressed zstd package; older releases can differ. Check the official installer source for the version you intend to use.
2. Download and inspect the official installer
The official Linux instructions provide the supported installer. Save a local copy first so you can read it before executing code that may request administrator privileges:
curl --fail --show-error --location https://ollama.com/install.sh --output ollama-install.sh
less ollama-install.sh
Run the next command only after the download succeeds and you have reviewed the file:
sh ollama-install.sh
The installer chooses a binary directory from the host environment and configures a service when supported. Do not assume a fixed executable path or that every environment automatically starts a daemon. For an existing installation, preserve its service configuration and model-store location before updating.
3. Verify the executable, service and endpoint separately
Run these individually; a failing check is useful evidence rather than a reason to run a second server:
command -v ollama
ollama --version
systemctl status ollama --no-pager
systemctl is-enabled ollama
systemctl show ollama -p User -p ExecStart -p FragmentPath -p DropInPaths
curl --fail --show-error --noproxy '*' --connect-timeout 5 --max-time 15 http://127.0.0.1:11434/api/tags
--noproxy '*' makes this explicit loopback check bypass proxy environment settings. The time limits are diagnostic choices, not performance targets. The installed-model endpoint returns a model list. An empty list can be valid before downloading weights.
| Result | What it establishes | Next action |
|---|---|---|
| Executable found | The shell resolves a command. | Compare its path with the service ExecStart; this alone does not prove the daemon is running. |
| Service active | systemd reports the unit running. | Check the API separately; service state is not an inference result. |
| Service enabled | The unit is configured for activation through its enablement links. | Check current state separately. Enabled does not mean currently active. |
| HTTP success with models array | The local model-list endpoint responds. | Choose an installed tag or deliberately download one. |
| Connection refused | The requested connection was not accepted. | Inspect unit state, bind address and logs before reinstalling. |
The systemctl manual distinguishes unit state, enablement and effective service properties. If the service is stopped and this is the intended installation, start it with sudo systemctl start ollama. A missing unit or unavailable systemd manager requires checking the installation method, not blindly starting another ollama serve.
Bash says ollama: command not found, but the service may still run
Start here: a missing shell command and an unreachable model server are different failures. A system service can use an absolute executable path while your interactive shell searches a different environment. Identify both before reinstalling.
These inspection commands are for Bash on the native Linux host. Run them individually in the shell that failed, not in another container, SSH host or WSL distribution:
type -a ollama
command -v ollama
printf '%s\n' "$PATH"
systemctl show ollama -p ExecStart -p User -p FragmentPath
systemctl cat ollama
A failed lookup is useful evidence. Compare the service’s ExecStart path with the command paths the shell reports. The systemctl reference documents effective unit inspection. Review configuration locally and remove secrets before sharing it.
| Observation | Next step |
|---|---|
| Service has a known executable, shell finds none | Inspect that exact file and its containing directory. Check whether that directory belongs in this shell’s intended PATH. |
| Shell resolves an alias, function or a different binary | Identify its origin before changing files. Compare the intended installation and server endpoint. |
| Service references a missing file | Check installation history and logs. Do not create a replacement symlink to an arbitrary binary. |
| No service unit exists | Confirm whether this environment uses a manual process, container or another installation method. |
After you have identified a trusted executable, inspect its exact path and invoke that path with --version. Do not paste a guessed path from another machine. The official installer source selects its binary directory from the host environment; a fixed path in a tutorial is not proof of your installation location.
If a PATH entry is actually missing, test the intended directory in a temporary shell session first. Preserve the old configuration before making a persistent shell-profile change. A new login shell, an interactive terminal, sudo and a service can have different environments. Do not add untrusted or writable download folders merely to make command lookup succeed.
Once command resolution works, repeat the API and selected-model checks above. A working --version command does not prove that the daemon, model library or GPU is working. If the API responds but lists the wrong models, use our endpoint and tag diagnostic; do not delete the model store to repair PATH.
Update, 28 October 2026: added command-resolution diagnosis. Shell syntax was checked and command lookup was demonstrated with a synthetic executable; no Ollama installation, model download or live inference was performed.
4. Download deliberately, then try one local model
The following example downloads weights if absent and then performs inference. Check the model’s current card, licence, storage and hardware needs first; the tag is an example, not a universal recommendation:
ollama pull llama3.2:3b
ollama run llama3.2:3b "Reply with one short greeting."
ollama ps
The CLI reference documents pull, run and running-model inspection. Check whether your shell sets OLLAMA_HOST: a CLI pointed at a remote instance is not testing this host. Inspect ollama ps while the model remains loaded; an empty result after unloading is not proof of a failed installation.
5. Check GPU support without copying overrides
A working CPU installation and working GPU acceleration are separate outcomes. Consult the current hardware support reference for the exact device and driver stack. The old generic NVIDIA 535+ advice is not a reliable requirement for current releases. Do not apply a ROCm architecture override copied from another card.
For NVIDIA, nvidia-smi checks the driver-facing device view. It does not prove Ollama offload. Compare the running-model processor information and server logs during your own request. For AMD permissions, inspect the actual devices and service user before changing group membership. The current installer already adds the service account to relevant groups when present.
6. Read logs and manage configuration reversibly
journalctl -u ollama -n 80 --no-pager
systemctl cat ollama
Remove credentials, private prompts and sensitive paths before sharing logs or service configuration. For a systemd-managed instance, use sudo systemctl edit ollama for a deliberate drop-in change and review the result with systemctl cat ollama. Changing a variable in your interactive shell does not automatically change the running service environment.
After an approved service configuration change, apply it during an interruption you can tolerate:
sudo systemctl daemon-reload
sudo systemctl restart ollama
A restart interrupts current work. Recheck the endpoint and your selected model afterward. Consult the official log and troubleshooting reference and our response and service diagnostics if a failure persists.
7. Keep storage and frontend routing explicit
The service account and an interactive user can use different model stores. Inspect the effective service settings before moving weights; use our storage migration and verification guide. For updates, retain the current configuration and use the official installation method again, then repeat the separate checks above. Full uninstallation can remove model data; follow the official Linux instructions for the identified paths after preserving anything needed.
For a frontend in Docker, loopback refers to its own container. Use the topology checks in our frontend connection guide. A browser CORS setting is not a substitute for correct host routing or authentication. This local setup does not require opening port 11434 to the public internet.
Next step: retain the binary path, version, effective service properties, API result and one model-request result as separate installation evidence. Fix the first failed stage before adding a frontend or changing GPU settings.
Sources and verification scope
Updated 26 October 2026 to correct driver and service-path assumptions and replace the malformed GPU example with evidence-based checks. Examples were reviewed against current official references. No Ubuntu host installation, model download, hardware benchmark or inference run was performed for this update. The original publication date remains unchanged. Read the AI Models News sourcing and correction policy.