1 min read · updated 17 Nov 2026
Ollama command cheat sheet
The Ollama commands and settings you will use every day, with one-line explanations.
Everyday commands
| Command | What it does |
|---|---|
ollama run MODEL | Chat with a model in the terminal (downloads it first if needed) |
ollama pull MODEL | Download a model without starting a chat |
ollama list | Show installed models |
ollama ps | Show loaded models and whether they use the GPU or CPU |
ollama stop MODEL | Unload a model from memory now |
ollama rm MODEL | Delete a model to free disk space |
ollama serve | Start the server by hand |
Inside a chat
| Input | What it does |
|---|---|
/bye | Leave the chat |
/set parameter num_ctx 8192 | Change the context length for this chat |
Settings (environment variables)
| Variable | Effect |
|---|---|
OLLAMA_HOST=0.0.0.0:11434 | Listen on all network interfaces instead of only 127.0.0.1 |
OLLAMA_CONTEXT_LENGTH | Default context length (the default is 4096 tokens) |
OLLAMA_KEEP_ALIVE | How long a model stays loaded after the last request (default 5 minutes) |
OLLAMA_MODELS | Folder where models are stored |
HTTPS_PROXY | Proxy for downloads (avoid HTTP_PROXY) |
API
The local API is at http://localhost:11434. Endpoints listed in the official documentation include /api/chat and an OpenAI-compatible /v1/chat/completions.
curl http://localhost:11434/api/chat -d '{"model":"llama3.1","messages":[{"role":"user","content":"Say hello"}],"stream":false}'Source: official Ollama documentation and FAQ, read on 2026-11-17.
More cheat sheets
Not sure your computer can run a model? Use the will-it-run checker.

