Install Ollama on Linux and run your first model
Step-by-step: install Ollama on Linux with the official script, run a model, manage the systemd service and read logs when something fails.
Before you start
You need a Linux machine with a terminal, internet access for the first download, and enough disk space for the models you want. Small 7B models are roughly 4 to 5 GB each (Mistral 7B is about 4.4 GB on the Ollama library). If you have an NVIDIA GPU, check that the driver works by running nvidia-smi; if it prints your card, the driver is loaded.
Step 1: Install with the official script
The Ollama documentation gives this one-line installer:
curl -fsSL https://ollama.com/install.sh | shOnly run a script you trust. Read it first if you prefer by opening https://ollama.com/install.sh in a browser. The documentation also describes a manual install by extracting the tar.zst archive into /usr, for people who do not want to pipe a script into a shell.
Step 2: Run a model
ollama run mistralThe first run downloads the model. At the >>> prompt, type a question. Type /bye to leave.
Step 3: The background service
On systems that use systemd, Ollama runs as a service. If the command line cannot reach it, start the server by hand with ollama serve, or manage the service with systemctl. To read its log, run:
journalctl -e -u ollamaMake Ollama reachable from other machines
By default Ollama listens only on 127.0.0.1:11434. To accept connections from other computers, the FAQ says to set OLLAMA_HOST=0.0.0.0:11434. Only do this on a network you trust, because the API has no login.
Troubleshooting
- Model runs on CPU although you have a GPU. Run
ollama ps. Then checknvidia-smiand the service log. - A download fails behind a proxy. Use
HTTPS_PROXY; the FAQ advises againstHTTP_PROXY. - To uninstall, follow the removal steps in the official Linux documentation.
Sources
Facts on this page come from the official Ollama documentation for Linux and its FAQ, read on 2026-11-17.
Models used here
More setup guides
Not sure your computer can run a model? Use the will-it-run checker.

