Ollama commands worth knowing
The part of the CLI you will use, plus two flags that fix the problems everyone hits.
Tested on Llama 3.3 70B ·
| Command | What it does | Worth knowing |
|---|---|---|
ollama run MODEL |
Pull if needed, then start a chat | First run downloads several GB with no size warning |
ollama list |
Show installed models and their size on disk | The fastest way to find what is eating the disk |
ollama ps |
Show what is loaded in memory right now | Shows whether it went to GPU or fell back to CPU - check this when it is slow |
ollama create NAME -f Modelfile |
Bake a system prompt and parameters into a named model | Your rules travel with the model instead of living in every script |
ollama show MODEL --modelfile |
Print the Modelfile of an existing model | Best way to see what defaults you inherited |
PARAMETER num_ctx 32768 |
Set the context window in a Modelfile | The default is far lower than the model supports and it truncates silently |
OLLAMA_HOST=0.0.0.0 ollama serve |
Listen on the network beyond localhost | No authentication - only on a network you trust |
ollama rm MODEL |
Delete a model and reclaim the disk | Immediate, no confirmation |
Ollama documents all of this across pages nobody opens twice.
Notes from the author
When generation is slow, run ollama ps before anything else. Most of the time it reports the model on CPU because it did not fit in VRAM, and no prompt tuning fixes that.
For information only, not professional advice. You use it at your own risk and we are not liable for any loss or damage. See the disclaimer.
Tagged