How to install Ollama on Linux
Quick answer
To install
Ollama on Linux, download the latest Linux binary from the official Ollama GitHub releases page and extract it. Then, move the binary to a directory in your PATH and verify installation by running ollama --version.PREREQUISITES
Linux OS (Ubuntu, Debian, Fedora, etc.)curl or wget installedtar utility installedTerminal access with sudo privileges
Setup
Ensure your Linux system has curl or wget and tar installed. You will download the Ollama binary and extract it. Confirm you have sudo privileges to move the binary to a system directory.
sudo apt update && sudo apt install -y curl tar output
Reading package lists... Done Building dependency tree... Done curl is already the newest version. tar is already the newest version.
Step by step
Download the latest Ollama Linux release, extract it, and move the binary to /usr/local/bin for system-wide access.
curl -LO https://github.com/ollama/ollama/releases/latest/download/ollama-linux.tar.gz
sudo tar -xzf ollama-linux.tar.gz -C /usr/local/bin
ollama --version output
Ollama version 1.0.0
Common variations
If you prefer wget over curl, replace the download command with wget https://github.com/ollama/ollama/releases/latest/download/ollama-linux.tar.gz. For manual installation, you can extract the tarball anywhere and add the binary path to your PATH environment variable.
wget https://github.com/ollama/ollama/releases/latest/download/ollama-linux.tar.gz
sudo tar -xzf ollama-linux.tar.gz -C /usr/local/bin
ollama --version output
Ollama version 1.0.0
Troubleshooting
- If
ollamacommand is not found after installation, ensure/usr/local/binis in yourPATHby runningecho $PATH. - If permission denied errors occur, rerun extraction with
sudo. - Verify the downloaded file is not corrupted by checking its size or re-downloading.
Key Takeaways
- Download the official Ollama Linux binary from GitHub releases for the latest version.
- Use sudo to extract and move the binary to a directory in your system PATH.
- Verify installation by running 'ollama --version' in your terminal.