Web Asset House Guides
Local AI

Ollama on Linux: Install, Run It as a systemd Service, GPU Drivers, Updates and Uninstall

By Web Asset House Studio ·

Note: Some future links on this site may be affiliate links. We never claim hands-on testing; guides are researched from the public sources listed in each article.

How we wrote this: A summary of Ollama's official Linux page and FAQ (linked below), checked October 29, 2026. Commands are copied from those docs; package names and paths can change between releases, so check the docs before running anything with sudo.

Linux is the natural home for a small always-on AI box: an old desktop with a graphics card, a mini PC or a home server. Ollama's Linux docs cover both a quick install and a hand-built one. (On other systems, see Ollama on a Mac, Ollama on Windows or Ollama in Docker.)

The quick way: the install script

The docs give one command:

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

Piping a script into a shell runs it with your permissions, so it's reasonable to open https://ollama.com/install.sh in a browser and read it first. Afterwards, try a model as in our Ollama beginner guide.

The manual way

If you'd rather see each step, the docs' manual install downloads a package and extracts it into /usr:

curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst \
 | sudo tar x -C /usr

Start the server with ollama serve, then in another terminal check it with ollama -v.

Run it as a startup service (recommended)

The docs recommend running Ollama under its own user with systemd. Create the user and group, and add yourself to the group:

sudo useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama
sudo usermod -a -G ollama $(whoami)

Create /etc/systemd/system/ollama.service:

[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=$PATH"

[Install]
WantedBy=multi-user.target

Then enable and start it:

sudo systemctl daemon-reload
sudo systemctl enable ollama
sudo systemctl start ollama
sudo systemctl status ollama

GPU drivers (optional)

To see whether a model actually loaded onto the GPU, run ollama ps and read the Processor column (100% GPU, 100% CPU or a split). More in is Ollama using my GPU?.

Change settings: systemctl edit

When Ollama runs as a service, the FAQ says to set environment variables through systemd:

sudo systemctl edit ollama.service

Add lines under [Service], for example:

[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"

Save, then reload and restart:

sudo systemctl daemon-reload
sudo systemctl restart ollama

You can also write the same thing to /etc/systemd/system/ollama.service.d/override.conf. Settings people commonly change:

Logs, updates and specific versions

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

The 0.5.7 is the docs' example, not a recommendation.

Uninstall

The docs' steps, in order:

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service
sudo rm -r $(which ollama | tr 'bin' 'lib')
sudo rm $(which ollama)
sudo userdel ollama
sudo groupdel ollama
sudo rm -r /usr/share/ollama

The last line deletes your downloaded models. Double-check the paths before pressing Enter.

Once it's running

Use it from scripts with the local API or the official Python and JavaScript libraries, or add a browser chat window with Open WebUI.

Sources

← All Local AI guides · All guides