Skip to content

Ollama Docs, Revised

Install Ollama on Linux1

Task page. 14 changes, 9 questions for the owner. Audit: improved. Original source at commit 318ee28.

Revised

This page shows how to install Ollama on Linux, run it as a startup service, update it, and remove it.2?1?2

Install

To install Ollama, run the following command:

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

Manual install

Note: If you're upgrading from a prior version, remove the old libraries first with sudo rm -rf /usr/lib/ollama.3

Download and extract the package:

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

Start Ollama:

ollama serve

In another terminal, verify that Ollama is running:?3

ollama -v

AMD GPU install

If you have an AMD GPU, also download and extract the additional ROCm package:

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

ARM64 install

Download and extract the ARM64-specific package:

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

Create a user and group for Ollama:

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

Create a service file in /etc/systemd/system/ollama.service:X13

[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 reload systemd and enable the service:4

sudo systemctl daemon-reload
sudo systemctl enable ollama

Install CUDA drivers (optional)

Download and install CUDA.5

To verify that the drivers are installed, run the following command. It should print details about your GPU:6

nvidia-smi

Install AMD ROCm drivers (optional)

Download and install ROCm version 7.7

Start Ollama

Start Ollama and verify it's running:14

sudo systemctl start ollama
sudo systemctl status ollama

Note: AMD has contributed the amdgpu driver upstream to the official Linux kernel source, but that version is older and may not support all ROCm features. For the best support of your Radeon GPU, install the latest driver from AMD's Linux driver downloads.8

Customizing

To customize the installation, edit the systemd service file or the environment variables by running:9

sudo systemctl edit ollama

Alternatively, create an override file manually in /etc/systemd/system/ollama.service.d/override.conf:X5

[Service]
Environment="OLLAMA_DEBUG=1"

Updating

Update Ollama by running the install script again:X34

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

Or download the package again:10

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

Installing specific versions

To install a specific version, including a pre-release, set the OLLAMA_VERSION environment variable when you run the install script. Find version numbers on the releases page.11X12

The following example installs version 0.5.7:12

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

Viewing logs

To view the logs when Ollama runs as a startup service, run:13X33

journalctl -e -u ollama

Uninstall

Remove the ollama service:

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service

Remove ollama libraries from your lib directory (either /usr/local/lib, /usr/lib, or /lib):?4

sudo rm -r $(which ollama | tr 'bin' 'lib')

Remove the ollama binary from your bin directory (either /usr/local/bin, /usr/bin, or /bin):

sudo rm $(which ollama)

Remove the downloaded models and Ollama service user and group:

sudo userdel ollama
sudo groupdel ollama
sudo rm -r /usr/share/ollama

Notes on this page

  1. 1 Wording Audit: improved A task title starts with a verb and names the result.

    Was: Linux

    type-title-signals-type type-task-one-goal

    Auditor: The verb-led title tells readers what they can do and where.

  2. 2 Added Audit: improved A goal sentence before the first section, built only from the sections the page already has.

    proc-state-goal

    Auditor: The opening sentence previews the page’s contents using information already present.

  3. 3 Wording Audit: improved Imperative, with a contraction and without 'you should'.

    Was: If you are upgrading from a prior version, you should remove the old libraries > with sudo rm -rf /usr/lib/ollama first.

    proc-imperative voice-contractions voice-second-person

    Auditor: The warning is shorter and more direct while preserving the instruction.

  4. 4 Accuracy Audit: improved The commands that follow reload systemd and enable the service; the service is started in the next section.

    Was: Then start the service:

    proc-result-in-step

    Auditor: The new lead-in accurately describes commands that reload systemd and enable the service.

  5. 5 Wording Audit: improved Link text now names the destination; the target is unchanged.

    Was: Download and install CUDA.

    link-descriptive-text

    Auditor: The revised link text names CUDA and the action, while preserving the target.

  6. 6 Wording Audit: improved Split into two sentences, one idea each.

    Was: Verify that the drivers are installed by running the following command, which should print details about your GPU:

    prin-one-idea-per-sentence

    Auditor: Splitting the instruction and expected output into two sentences makes the check easier to scan.

  7. 7 Wording Audit: improved Writes 'version 7' in prose and makes the link text name its destination.

    Was: Download and Install ROCm v7.

    VersionWord link-descriptive-text cap-sentence-case-interface

    Auditor: The sentence uses sentence case and names the ROCm version in plain language while keeping the link target.

  8. 8 Wording Audit: improved Raw URL became a link to the same address, 'Linux' is capitalized, and the recommendation is stated directly.

    Was: While AMD has contributed the amdgpu driver upstream to the official linux > kernel source, the version is older and may not support all ROCm features. We > recommend you install the latest driver from > https://www.amd.com/en/support/download/linux-drivers.html for best support of your Radeon > GPU.

    link-no-raw-url voice-we-for-company

    Auditor: The raw URL is now descriptive link text, and the driver recommendation is easier to read without changing its substance.

  9. 9 Wording Audit: improved Starts with the action instead of 'you can'.

    Was: To customize the installation of Ollama, you can edit the systemd service file or the environment variables by running:

    proc-imperative prin-plain-words

    Auditor: The sentence leads with the action and removes unnecessary wording.

  10. 10 Wording Audit: improved Gives an imperative step and removes the flagged prefix.

    Was: Or by re-downloading Ollama:

    ClosedPrefixes proc-imperative

    Auditor: The instruction is more direct and retains the package download option.

  11. 11 Wording Audit: improved Leads with the goal, adds the missing article, and links the releases page by name.

    Was: Use OLLAMA_VERSION environment variable with the install script to install a specific version of Ollama, including pre-releases. You can find the version numbers in the releases page.

    prin-lead-with-the-answer prin-one-idea-per-sentence

    Auditor: The paragraph leads with the task and links to the releases page by name.

  12. 12 Wording Audit: improved Says what the example does, using the version already in the command.

    Was: For example:

    code-show-output proc-result-in-step

    Auditor: The example lead-in explains what the command does.

  13. 13 Wording Audit: improved Clearer phrasing of the same condition.

    Was: To view logs of Ollama running as a startup service, run:

    prin-plain-words

    Auditor: The revised sentence is shorter and keeps the condition that Ollama runs as a startup service.

  14. 14 Wording Audit: improved Uses a contraction.

    Was: Start Ollama and verify it is running:

    PronounContractions

    Auditor: The contraction makes the sentence more conversational without changing its meaning.

Questions for the owner

  • ?1 This page covers several goals (install, run as a service, update, uninstall); should it be split into separate task pages, with this one linking to them?

    About: “This page shows how to install Ollama on Linux, run it as a startup service, update it, and remove it.”

  • ?2 What does the reader need before starting (for example permissions, tools, or disk space), so a prerequisites list can be added?

    About: “This page shows how to install Ollama on Linux”

  • ?3 What output should the reader see from this check, so the page can say what success looks like?

    About: “In another terminal, verify that Ollama is running:”

  • ?4 Does tr 'bin' 'lib' replace the word 'bin' or each of the letters b, i and n, and is it safe in a command run with sudo rm -r?

    About: “sudo rm -r $(which ollama | tr 'bin' 'lib')”

  • X5 Linux service customization omits reload and restart. The Linux page shows how to edit the systemd service but gives no step to apply the change; the FAQ's version of the same procedure ends with a daemon reload and restart. Should the Linux Customizing section add the systemctl daemon-reload and systemctl restart ollama step?

    Pages: Install Ollama on Linux, Local FAQ

  • X12 How to install a pre-release. The FAQ installs pre-releases through a preview channel, while Linux and Troubleshooting use OLLAMA_VERSION for pre-releases. Is the preview channel now the supported way to get pre-releases, and should Linux and Troubleshooting say so?

    Pages: Local FAQ, Install Ollama on Linux, Troubleshooting

  • X13 Path of the Linux ollama binary. The Linux install extracts to /usr and the service runs /usr/bin/ollama, but the Hardware support page's setcap command targets /usr/local/bin/ollama. Which path should the setcap example use, or should it use $(which ollama)?

    Pages: Install Ollama on Linux, Hardware support

  • X33 Linux log commands differ. Linux and Troubleshooting both tell readers how to view service logs, with different journalctl commands. Which page should own log instructions, with the other linking to it?

    Pages: Install Ollama on Linux, Troubleshooting

  • X34 Upgrade instructions in FAQ and Linux. Both pages give the Linux upgrade command; Linux also gives a tarball method that the FAQ does not. Should the FAQ link to the Linux Updating section instead of repeating it?

    Pages: Local FAQ, Install Ollama on Linux

Original

Install

To install Ollama, run the following command:

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

Manual install

Note: If you are upgrading from a prior version, you should remove the old libraries with sudo rm -rf /usr/lib/ollama first.

Download and extract the package:

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

Start Ollama:

ollama serve

In another terminal, verify that Ollama is running:

ollama -v

AMD GPU install

If you have an AMD GPU, also download and extract the additional ROCm package:

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

ARM64 install

Download and extract the ARM64-specific package:

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

Create a user and group for Ollama:

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

Create a service file in /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 start the service:

sudo systemctl daemon-reload
sudo systemctl enable ollama

Install CUDA drivers (optional)

Download and install CUDA.

Verify that the drivers are installed by running the following command, which should print details about your GPU:

nvidia-smi

Install AMD ROCm drivers (optional)

Download and Install ROCm v7.

Start Ollama

Start Ollama and verify it is running:

sudo systemctl start ollama
sudo systemctl status ollama

Note: While AMD has contributed the amdgpu driver upstream to the official linux kernel source, the version is older and may not support all ROCm features. We recommend you install the latest driver from https://www.amd.com/en/support/download/linux-drivers.html for best support of your Radeon GPU.

Customizing

To customize the installation of Ollama, you can edit the systemd service file or the environment variables by running:

sudo systemctl edit ollama

Alternatively, create an override file manually in /etc/systemd/system/ollama.service.d/override.conf:

[Service]
Environment="OLLAMA_DEBUG=1"

Updating

Update Ollama by running the install script again:

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

Or by re-downloading Ollama:

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

Installing specific versions

Use OLLAMA_VERSION environment variable with the install script to install a specific version of Ollama, including pre-releases. You can find the version numbers in the releases page.

For example:

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

Viewing logs

To view logs of Ollama running as a startup service, run:

journalctl -e -u ollama

Uninstall

Remove the ollama service:

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service

Remove ollama libraries from your lib directory (either /usr/local/lib, /usr/lib, or /lib):

sudo rm -r $(which ollama | tr 'bin' 'lib')

Remove the ollama binary from your bin directory (either /usr/local/bin, /usr/bin, or /bin):

sudo rm $(which ollama)

Remove the downloaded models and Ollama service user and group:

sudo userdel ollama
sudo groupdel ollama
sudo rm -r /usr/share/ollama

What Changed

The page now has a verb-led title and a goal sentence. Wording was tightened (contractions, imperative steps, descriptive link text, a raw URL turned into a link), and one sentence that said to start the service while the commands only reload and enable it was corrected. Open questions cover the page's several goals, missing prerequisites and success output, and a destructive uninstall command.

Content type: task. The page walks a reader through installing, running, updating and removing Ollama on Linux, which are step-by-step procedures toward concrete results.

Automated check, original: 0 errors, 4 warnings, 2 suggestions. Revised: 0 errors, 3 warnings, 0 suggestions.

Independent audit (GPT-6): improved. The revision is clearer and corrects a misleading instruction about when the service starts. It keeps the commands and link targets intact, though the page still misses some of the standard’s guidance for task steps and reader needs.

What the revision missed:

  • The standard says to number steps, one action each, and use lists for steps and options; the procedure sections still present their steps as unnumbered prose and code blocks.
  • The page still does not state prerequisites or describe what successful verification looks like; the revision appropriately raises these as questions, but they remain unresolved.
  • The uninstall instructions include recursive removal commands, and the standard calls for every step and warning when a mistake could cost data; the revision flags one command for review but does not add a warning or resolve its safety.
  • The page covers several distinct goals despite the standard’s advice to focus a piece on a specific reader and next action; the revision asks whether to split it but leaves the broad scope in place.

Wording (12)

  • 1 A task title starts with a verb and names the result. improved
  • 3 Imperative, with a contraction and without 'you should'. improved
  • 5 Link text now names the destination; the target is unchanged. improved
  • 6 Split into two sentences, one idea each. improved
  • 7 Writes 'version 7' in prose and makes the link text name its destination. improved
  • 8 Raw URL became a link to the same address, 'Linux' is capitalized, and the recommendation is stated directly. improved
  • 9 Starts with the action instead of 'you can'. improved
  • 10 Gives an imperative step and removes the flagged prefix. improved
  • 11 Leads with the goal, adds the missing article, and links the releases page by name. improved
  • 12 Says what the example does, using the version already in the command. improved
  • 13 Clearer phrasing of the same condition. improved
  • 14 Uses a contraction. improved

Accuracy (1)

  • 4 The commands that follow reload systemd and enable the service; the service is started in the next section. improved

Added (1)

  • 2 A goal sentence before the first section, built only from the sections the page already has. improved