Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
docs: improve linux install documentation (#6683)
Jeffrey Morgan108fb6c1d1c3
diff --git a/docs/linux.md b/docs/linux.mdindex 46c17a20d..0eec014f4 100644--- a/docs/linux.md+++ b/docs/linux.md@@ -1,43 +1,57 @@-# Ollama on Linux+# Linux## Install-Install Ollama running this one-liner:+To install Ollama, run the following command:->--```bash+```shellcurl -fsSL https://ollama.com/install.sh | sh```-## AMD Radeon GPU support+## Manual install-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/linux-drivers for best support of your Radeon-GPU.+Download and extract the package:-## Manual install+```shell+curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz+sudo tar -C /usr -xzf ollama-linux-amd64.tgz+```++Start Ollama:++```shell+ollama serve+```-### Download `ollama`+In another terminal, verify that Ollama is running:-Download and extract the Linux package:+```shell+ollama -v+```++### AMD GPU install-```bash-curl -fsSL https://ollama.com/download/ollama-linux-amd64.tgz | sudo tar zx -C /usr+If you have an AMD GPU, also download and extract the additional ROCm package:++```shell+curl -L https://ollama.com/download/ollama-linux-amd64-rocm.tgz -o ollama-linux-amd64-rocm.tgz+sudo tar -C /usr -xzf ollama-linux-amd64-rocm.tgz```-If you have an AMD GPU, also download and extract the ROCm package into the same location-```bash-curl -fsSL https://ollama.com/download/ollama-linux-amd64-rocm.tgz | sudo tar zx -C /usr+### ARM64 install++Download and extract the ARM64-specific package:++```shell+curl -L https://ollama.com/download/ollama-linux-arm64.tgz -o ollama-linux-arm64.tgz+sudo tar -C /usr -xzf ollama-linux-arm64.tgz```### Adding Ollama as a startup service (recommended)Create a user and group for Ollama:-```bash+```shellsudo useradd -r -s /bin/false -U -m -d /usr/share/ollama ollamasudo usermod -a -G ollama $(whoami)```@@ -63,47 +77,54 @@ WantedBy=default.targetThen start the service:-```bash+```shellsudo systemctl daemon-reloadsudo systemctl enable ollama```-### Install CUDA drivers (optional – for Nvidia GPUs)+### Install CUDA drivers (optional)[Download and install](https://developer.nvidia.com/cuda-downloads) CUDA.Verify that the drivers are installed by running the following command, which should print details about your GPU:-```bash+```shellnvidia-smi```-### Install ROCm (optional - for Radeon GPUs)-[Download and Install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html)+### Install AMD ROCm drivers (optional)-Make sure to install ROCm v6+[Download and Install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html) ROCm v6.### Start OllamaStart Ollama and verify it is running:-```bash+```shellsudo systemctl start ollamasudo systemctl status ollama```-## Update+> [!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/linux-drivers for best support of your Radeon+> GPU.++## Updating-Update ollama by running the install script again:+Update Ollama by running the install script again:-```bash+```shellcurl -fsSL https://ollama.com/install.sh | sh```-Or by downloading the ollama binary:+Or by re-downloading Ollama:-```bash-curl -fsSL https://ollama.com/download/ollama-linux-amd64.tgz | sudo tar zx -C /usr+```shell+curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz+sudo tar -C /usr -xzf ollama-linux-amd64.tgz```## Installing specific versions@@ -112,15 +133,15 @@ Use `OLLAMA_VERSION` environment variable with the install script to install a sFor example:-```-curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.1.32 sh+```shell+curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.3.9 sh```## Viewing logsTo view logs of Ollama running as a startup service, run:-```bash+```shelljournalctl -e -u ollama```@@ -128,7 +149,7 @@ journalctl -e -u ollamaRemove the ollama service:-```bash+```shellsudo systemctl stop ollamasudo systemctl disable ollamasudo rm /etc/systemd/system/ollama.service@@ -136,13 +157,13 @@ sudo rm /etc/systemd/system/ollama.serviceRemove the ollama binary from your bin directory (either `/usr/local/bin`, `/usr/bin`, or `/bin`):-```bash+```shellsudo rm $(which ollama)```Remove the downloaded models and Ollama service user and group:-```bash+```shellsudo rm -r /usr/share/ollamasudo userdel ollamasudo groupdel ollama