पाठ 8 / 30
Everyday Ollama CLI Commands
यह पाठ अभी हिंदी में अनुवादित नहीं है, इसलिए अंग्रेज़ी में दिखाया जा रहा है।
Pull, run, list, inspect, stop and remove models with the core Ollama commands.
लेखक: Rahul Agarwal · 15 साल से वेब डेवलपर
The handful of commands you will use daily
ollama pull <model> downloads a model and its layers. ollama run <model> pulls if needed, loads the model and opens an interactive chat; pass a prompt as an argument for a one-shot answer instead. Inside the chat, /bye exits, /set parameter changes options for the session, and /show info prints model details. ollama list shows what is on disk with sizes. ollama ps shows what is loaded in memory right now, how much it uses, whether it is on GPU, CPU or split, and when it will unload. ollama show <model> prints the architecture, parameters, context length, quantization and template, and can print the Modelfile with --modelfile. ollama stop <model> unloads a model immediately, and ollama rm <model> deletes it from disk. Model names use a name:tag form, such as qwen2.5:7b; if you omit the tag, Ollama uses latest.
A typical first session
One-shot prompts are handy for scripts; the interactive mode is for exploration.
ollama pull llama3.2 # download (tag defaults to :latest)
ollama run llama3.2 "Explain recursion in two lines"
ollama list # models on disk
ollama ps # models in memory, CPU/GPU split
ollama show llama3.2 # context length, quantization, etc.
ollama stop llama3.2 # unload from memory now
ollama rm llama3.2 # delete from diskRead ollama ps before blaming the model
If generation is unexpectedly slow, ollama ps often explains it: a PROCESSOR column such as "48%/52% CPU/GPU" means part of the model did not fit in VRAM and is running on the much slower CPU. Try a smaller model, a lower quantization or a shorter context.
त्वरित जाँच: Which command shows the models currently loaded into memory and their CPU/GPU placement?
- ollama ps
- ollama list
- ollama show
- ollama pull
Answer
ollama ps — `ollama ps` lists running (loaded) models with memory use and processor split. `ollama list` only shows what is downloaded.