# Skill: Install Ollama and run local LLMs from the terminal > Apply this skill when a user wants to get a local AI model running on their machine via the command line with minimal setup. Source: sodigi-learn -- local-agents/ollama -- https://sodigi.io/learn/local-agents/ollama ## When to use - User wants to run a local model for the first time and is comfortable with a terminal. - User needs a local OpenAI-compatible API endpoint other tools (editors, agents, scripts) can connect to. - User is setting up local AI as the foundation for a course, a project, or further automation. - User reports a previous local AI setup attempt failed due to complex configuration. ## Core rules - Ollama is a manager/wrapper, not the model itself; it downloads, loads, and serves models. - Three core commands cover everything needed on day one: `pull` (download), `run` (load + chat), `list` (inventory). - `pull` requires internet once; after that the model works offline permanently. - `run` opens a chat prompt in the terminal; if the model is not yet downloaded, `run` performs the `pull` first. - Exit the chat with `/bye` or the terminal's interrupt combo -- do not force-close the terminal window; the model should unload cleanly. - Under the hood Ollama runs a persistent local server that other programs can reach via its API. - Models are served in quantized (compressed) form by default; no manual compression step required. - Start with a small model; do not download the largest available model first. ## Procedure 1. Go to the official Ollama website and download the installer for the user's OS (Windows, macOS, Linux). 2. Install it like any standard application; the local server starts automatically in the background. 3. Open a terminal and run `ollama pull ` with a small model (e.g., `llama3` or `gemma2:2b`). 4. Wait for the download to complete (one-time, size varies by model). 5. Run `ollama run ` -- a chat prompt appears; type a question and verify the model responds. 6. Type `/bye` to exit the chat cleanly. 7. Run `ollama list` to confirm the model is stored on disk. 8. Verify the local server API is live by opening `http://localhost:11434` in a browser (should return a brief status message). ## Ready-to-use prompt ``` Walk me through getting Ollama running on my machine. My setup: - OS: [Windows / macOS / Linux] - GPU VRAM or total RAM: [X GB] Please provide: 1. The exact install step for my OS. 2. The pull command for a small model appropriate for my memory (7B or smaller in Q4 if tight). 3. The run command and what to expect in the terminal. 4. How to exit the chat cleanly. 5. How to confirm the local server is running and ready to accept connections from other tools. 6. The list command to verify what is installed. ``` ## Pitfalls - Downloading the largest model first -- it may not fit in memory and will either refuse to start or respond one word per minute. - Confusing `pull` and `run`: `pull` only downloads; the chat begins only after `run`. - Assuming internet is needed after the initial download -- once pulled, the model is fully offline. - Force-closing the terminal to end a chat session -- use `/bye` so the model unloads from memory properly. - Not checking available disk space before pulling; models range from 1 GB to 40+ GB. - Expecting cloud-model quality; Ollama runs smaller open models -- quality is a conscious trade-off for privacy and cost.