Run Ollama Locally in 2026: Every Command You Need

๐Ÿ“˜ AI Tutorials 2026-08-01 2 min read

The complete Ollama command reference: install, pull, run, serve, and manage models.

## Run Ollama Locally in 2026: Every Command You Need Ollama (177,426 stars) is the easiest way to run LLMs locally. Here is the complete command reference for daily use in 2026. ### Install [bash] # Linux / macOS curl -fsSL https://ollama.com/install.sh | sh # Windows: download the installer from ollama.com [/bash] ### Model management [bash] ollama pull qwen3:7b # download a model ollama list # show installed models ollama rm qwen3:7b # delete a model ollama show qwen3:7b # model details, context size [/bash] ### Run and chat [bash] ollama run qwen3:7b # interactive chat ollama run qwen3:7b tell me a joke ollama run qwen3:7b --verbose # show timing stats [/bash] ### Serve as API (OpenAI-compatible) [bash] ollama serve # start the server on port 11434 curl http://localhost:11434/v1/chat/completions -d {"model":"qwen3:7b","messages":[{"role":"user","content":"hi"}]} [/bash] ### Power-user commands [bash] ollama cp model1 model2 # clone a model ollama create custom -f Modelfile # build a custom model ollama ps # which models are loaded in memory ollama stop qwen3:7b # unload a model [/bash] ### Tips from production use - Default context is 2048-4096 tokens; increase with the num_ctx parameter in Modelfile for long documents - Keep the serve process running to avoid cold-load delays - Use OLLAMA_KEEP_ALIVE=30m to control how long models stay in memory ### FAQ **Does Ollama need a GPU?** No - it runs on CPU, but GPU (CUDA/Metal) gives 5-20x speedup. **Is the API OpenAI-compatible?** Yes, the /v1/chat/completions endpoint works with most tools that expect OpenAI.
Related Articles
2026-07-14
Local LLM Setup Guide 2026: Run AI Models on Windows, Mac, or Linux
2026-07-13
Run Ollama Locally with Docker: Complete 2026 Setup Guide
2026-07-14
Open Source AI Model Benchmarks 2026: Llama 3.1 vs Qwen 2.5 vs Mistral vs Phi-3

๐Ÿ’ฌ Comments (0)

No comments yet. Be the first!

Login to comment