Installing Ollama
After finishing this section, when you type ollama -v in the terminal, you will see a line with the version number.
Before You Start
- Have read What Is Local Deployment, and know your system and graphics card
- Can open a terminal: on Windows use PowerShell or Command Prompt; on Mac and Linux use the "Terminal"
Step 1: Download and Install
Windows and Mac: Go to ollama.com/download to download the installer.
- Windows: Run the installer. The official documentation states that installation does not require administrator privileges and installs by default in your user directory; the installation itself requires at least 4 GB of space. After installation, Ollama runs in the background, and the
ollamacommand can be used in Command Prompt and PowerShell. - Mac: Open the downloaded
ollama.dmgand drag Ollama into the "Applications" folder.
Linux: Official one-command install:
curl -fsSL https://ollama.com/install.sh | sh- The installer has finished running
Step 2: Verify the Installation
ollama -vYou should see:
ollama version is 0.40.16The version number depends on what you installed; when we wrote this course it was 0.40.16. If you see could not connect to a running Ollama instance, it means Ollama's background service is not running: on Windows and Mac, open the Ollama app; on Linux, run ollama serve.
$ollama -v
ollama version is 0.40.16
ollama -vprinted the version number
Step 3 (Optional): Put the Models on Another Drive
Model files are often several GB to tens of GB. Default locations per the official documentation:
| System | Where models are stored |
|---|---|
| Windows | C:\Users\%username%\.ollama\models |
| macOS | ~/.ollama/models |
| Linux | /usr/share/ollama/.ollama/models |
If your C drive is running low on space, set the environment variable OLLAMA_MODELS to point to another directory, then restart Ollama. On Windows, search for "environment variables" in "Settings" (Windows 11) or "Control Panel" (Windows 10), and add it under your user account.
- I know where models will be stored, and I have enough space
Checkpoint
- Ollama is installed
ollama -vprinted the version number- I know the default model storage location and can change
OLLAMA_MODELSwhen needed
Didn't Work?
It says it cannot connect to a running Ollama. The background service is not running. On Windows and Mac, open the Ollama app; on Linux, run ollama serve.
On Windows 10, the progress bar shows as squares. The official documentation states that Ollama draws progress with Unicode characters, which some older fonts cannot display; switching to a different terminal font fixes it.