Run Powerful AI Locally: Install Ollama on Ubuntu Linux – Complete Guide

in #tutorial14 hours ago

Want to run large language models like Llama, Gemma, or DeepSeek completely offline on your Ubuntu machine? Ollama makes it incredibly easy. It’s a lightweight, open-source tool that lets you download and run powerful AI models locally with simple terminal commands — perfect for privacy, zero API costs, and fast development.

Step-by-Step Installation on Ubuntu

  1. Update Your System
    Open the terminal and run:

    sudo apt update && sudo apt upgrade -y
    
  2. Install Ollama
    Use the official one-line installer:

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

    This automatically sets up Ollama and starts the service.

  3. Verify Installation
    Check the version:

    ollama --version
    
  4. Download & Run Your First Model
    Pull a model (start with smaller ones like llama3.2 or phi3 for testing):

    ollama pull llama3.2
    ollama run llama3.2
    

    Now you can chat directly in the terminal!