The fastest way to install Ollama on Linux is the official install script, fetched with curl and run as a shell script. It installs the binary and sets up the service, so Ollama starts on boot. This guide runs it and checks the install.
Before you start
- A Linux machine with curl installed.
- A user account with sudo, and an internet connection.
- A terminal.
Check the system first
Confirm curl is present and note your distribution:
curl --version
cat /etc/os-release | head -3
The script supports the common distributions. If curl is missing, install it with your package manager first.
Run the install script
Fetch and run the official script:
curl -fsSL https://ollama.com/install.sh | sh
The script downloads the binary, installs it, and sets up the ollama service. Let it finish without interrupting it.
Verify the install
Check the version and the service:
ollama --version
systemctl status ollama
The service should be active. Then pull a small model to confirm downloads work:
ollama pull qwen3:0.6b
Worked example
Worked example: on a fresh Ubuntu machine, run the curl script, then ollama --version should print a version such as 0.40.19, and ollama pull qwen3:0.6b should download the small model. A chat with ollama run qwen3:0.6b should then answer a short prompt.
Expected result
UNTESTED in this guide: no install was run while writing it. The expected result is that the script finishes, the service is active, and the small model downloads and chats.
Limitations
Piping a script from the internet into a shell runs code you have not read, so only use the official ollama.com address and check the URL before running it. The script needs sudo for the system install; do not run it as root if your setup allows a user install instead.
