CoderSathi
  • Tutorial
    • Java Tutorial
    • Swing Tutorial
    • JDBC Tutorial
    • Java String Tutorial
    • Servlet and JSP Tutorial
  • Mongo DB
  • AWS
  • DevOps
  • Linux
  • Git
Home > How to > How to Install Ollama on Windows, Linux, and macOS: A Step-by-Step Guide

How to Install Ollama on Windows, Linux, and macOS: A Step-by-Step Guide

Learn the concepts, implementation details, and practical steps with a clean developer-focused walkthrough.

Yuba Raj Kalathoki
By Yuba Raj Kalathoki
Last updated: July 1, 2026 · 4 min read · 0 Comments
Share: in X

Ollama is a powerful tool for running and managing large language models locally on your machine. Whether you’re a developer, researcher, or AI enthusiast, installing Ollama on your Windows, Linux Ubuntu, or macOS system unlocks endless possibilities. In this guide, we’ll walk you through the process to install ollama for all three platforms, ensuring you can get started quickly and efficiently.

Table of Contents

  • Why Use Ollama?
  • Prerequisites
  • How to Install Ollama on Windows
    • 1. Download the Installer
    • 2. Run the Installer
    • 3. Verify Installation
    • 4. Start Using Ollama
  • How to Install Ollama on Linux
    • 1. Install Dependencies
    • 2. Run the Installation Script
    • 3. Start the Ollama Service
    • 4. Test Ollama
  • How to Install Ollama on macOS
    • 1. Download Installaer
    • 2. Launch the Ollama Service
    • 3. Run Your First Model
  • Getting Started with Ollama Commands
    • Ollama Commands
  • Conclusion
  • FAQs
    • Does Ollama work on all operating systems?
    • What are the system requirements?
    • How do I exit or terminate ollama chat?

Why Use Ollama?

Ollama simplifies local LLM deployment with:

  • One-Click Install: Skip dependency hell—Ollama handles setup automatically.
  • Cross-Platform Support: Works on macOS, Linux, and Windows (via WSL).
  • GPU Acceleration: Optimizes performance for NVIDIA, AMD, and Apple Silicon.
  • Vast Model Library: Access hundreds of pre-configured models (e.g., Llama 3, Phi-3, DeepSeek).

Prerequisites

  1. Hardware:
    • 8GB+ RAM (16GB recommended for larger models).
    • 20GB+ free storage (models are hefty!).
    • Optional: NVIDIA/AMD GPU or Apple Silicon for faster inference.
  2. Software:
    • macOS, Linux, or Windows Subsystem for Linux (WSL) for Windows users.

How to Install Ollama on Windows

1. Download the Installer

Visit the official Ollama website and navigate to the downloads section. Select the Windows installer (.exe file) and download it.

2. Run the Installer

Double-click the downloaded .exe file to launch the setup wizard. Follow the on-screen prompts to complete the installation.

3. Verify Installation

Open Command Prompt or PowerShell and type:

ollama --version  

If the installation is successful, you’ll see the installed version of Ollama.

Sample output:

ollama version is 0.5.7

4. Start Using Ollama

Begin interacting with models by running commands like:

ollama run qwen2.5-coder:1.5b  

Note: Ensure Windows Defender or your antivirus allows Ollama through the firewall if you encounter connectivity issues.


How to Install Ollama on Linux

1. Install Dependencies

Open Terminal and update your package list:

sudo apt update && sudo apt upgrade -y  

2. Run the Installation Script

Use curl to download and execute the Ollama install script:

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

3. Start the Ollama Service

Enable and start the service with:

systemctl start ollama  

4. Test Ollama

Pull a model and run it:

ollama run qwen2.5-coder:1.5b

Tested Environment: I have tested it in my AWS EC2 instance type t2.large with 20GB Storage EBS Volume whitch has 8GB of RAM.


How to Install Ollama on macOS

1. Download Installaer

Download the macOS installer from the Ollama website and drag the app to your Applications folder and double click on the zipfile and follow the process.

2. Launch the Ollama Service

Open Terminal and start Ollama:

ollama serve  

3. Run Your First Model

Test the installation with:

ollama run qwen2.5-coder:1.5b 

Tested Environment: I have tested it in my M1 Mac Air base model which has 8Gb of RAM


Getting Started with Ollama Commands

After installation on any OS, explore Ollama’s capabilities. Following are some basic commands that will help you to use ollama.

Ollama Commands

ActionCommand
List available models in your computerollama list
Pull new modelsollama pull <model-name>
Remove modelsollama rm <model-name>
Run modelollama run <model-name>
List currently running modelsollama ps
Stop currently runnin modelollama stop <model-name>
Show model informationollama show <model-name>

Conclusion

Installing Ollama on Windows, Linux Ubuntu, or macOS is straightforward when you follow platform-specific steps. Whether you’re experimenting with AI models or integrating them into projects, Ollama’s cross-platform compatibility makes it a versatile choice. Start exploring today and unlock the potential of local language models!

FAQs

Does Ollama work on all operating systems?

Yes! Ollama supports Windows, Linux (Ubuntu/Debian), and macOS.

What are the system requirements?

Ensure at least 8GB RAM (16GB recommended) and 10GB of free storage.

How do I exit or terminate ollama chat?

Simply type /bye or Ctrl+d

Related Posts:

  • How to Run DeepSeek AI Locally Using Ollama: A…
  • Install and Set Up Java Development Environment
  • Step-by-Step Guide to Set Up Eclipse with Tomcat…
  • How to Solve “systemctl command not found” Error: A…
  • How to Upgrade AWS EC2 Ubuntu Version: A Step-by-Step Guide
  • Consistency and Availability in Distributed System
Tags:aihow-to
Was this article helpful?
← Previous ArticleData Types in Java
Next Article →How to Run DeepSeek AI Locally Using Ollama: A Step-by-Step Guide

Leave a Comment Cancel reply

You must be logged in to post a comment.

Recent Posts

  • How to implement Passwordless Authentication in Spring Boot: A Step-by-Step Guide
  • How to Use AWS CloudFront Signed URLs in Spring Boot?
  • How to Fix SSH Agent Forwarding on macOS: The Ultimate Guide for Developers
  • How to Read AWS Secrets Manager in Spring Boot (Step-by-Step)
  • How to Fix “Public Key Retrieval is not allowed” MySQL JDBC Error
CoderSathi

Your go-to resource for Java, Spring Boot, Microservices, AWS, and modern development tutorials.

Linkedin

Quick Links

  • About
  • Contact

Popular Topics

  • Java
  • Spring Boot
  • AWS
  • DevOps
  • MongoDB
  • Linux
  • Git
  • How to
© 2026 CoderSathi. All rights reserved. Privacy Policy · Sitemap