Contents

Ollama Commands Tutorial: Run, Pull, List, Manage, and Create Models

Run ollama --help to see all commands. Run ollama command --help to see a command's options.

Command overview

CommandPurpose
ollama run modelRun a model (downloads it first if needed) and start a conversation
ollama pull modelDownload or update a model only
ollama list (or ls)List downloaded models
ollama psList models currently loaded in memory
ollama stop modelUnload a model from memory
ollama rm modelDelete a model
ollama show modelView model information
ollama create name -f ModelfileCreate a custom model with a Modelfile
ollama cp source new-nameCopy a model (give it an alias)
ollama serveStart the Ollama service in the foreground
ollama push nameUpload a custom model to ollama.com
ollama signin / signoutSign in to / out of your ollama.com account
ollama launchConfigure and launch a supported integration

run

ollama run qwen3:8b                         # Interactive chat
ollama run qwen3:8b "Write a short poem about autumn"     # One-time prompt
ollama run gemma3 "Describe this image ./cat.png"     # Ask a vision model about an image
ollama run qwen3:8b --verbose "Hello"         # Show speed statistics
ollama run qwen3:8b --think=false "Hello"     # Turn off thinking mode
ollama run qwen3:8b --keepalive 1h          # Keep loaded for 1 hour
ollama run qwen3:8b --format json "List 3 kinds of fruit and answer in JSON"

For / commands in interactive mode, see Run your first model.

pull

ollama pull llama3.2
ollama pull qwen3:14b

After a model is updated (the same tag points to a new version), run pull again to download only the changed parts.

list

ollama list
NAME                ID              SIZE      MODIFIED
qwen3:8b            500a1f067a9f    5.2 GB    2 days ago
gemma3:latest       a2af6cc3eb7f    3.3 GB    1 week ago
nomic-embed-text    0a109f422b47    274 MB    3 weeks ago

ps and stop

ollama ps
NAME        ID              SIZE      PROCESSOR    CONTEXT    RUNNER      UNTIL
qwen3:8b    500a1f067a9f    6.8 GB    100% GPU     4096       llamacpp    3 minutes from now

(Output format from Ollama 0.40. Older versions don't have the RUNNER column.)

  • SIZE: Memory actually in use (larger than the file because it includes context)
  • PROCESSOR: GPU / CPU allocation ratio
  • CONTEXT: Current context length in use
  • RUNNER: Inference engine in use, such as llamacpp; supported models on Apple Silicon use MLX
  • UNTIL: When the model will be unloaded automatically
ollama stop qwen3:8b

rm

ollama rm gemma3:12b

This frees disk space immediately. File layers shared by multiple models are deleted only when no model is using them.

show

ollama show qwen3:8b

Example output (excerpt from qwen3:0.6b):

  Model
    architecture        qwen3
    parameters          751.63M
    context length      40960
    embedding length    1024
    quantization        Q4_K_M

  Capabilities
    completion
    tools
    thinking
        levels     false, true
        default    true

  Parameters
    repeat_penalty    1
    temperature       0.6
    top_k             20
    top_p             0.95

You can see the architecture, parameter count, maximum supported context length, quantization, and supported capabilities (completion, tools, thinking, vision). Parameters are the default values recommended by the model author.

ollama show qwen3:8b --modelfile    # Output this model's Modelfile
ollama show qwen3:8b --parameters   # Show parameters only
ollama show qwen3:8b --system       # Show the system prompt only
ollama show qwen3:8b --license      # License terms

--modelfile is a good starting point for a custom model.

create and cp

ollama create my-assistant -f ./Modelfile
ollama cp qwen3:8b qwen      # You can then run it with ollama run qwen

See the Modelfile tutorial for how to write a Modelfile.

serve

ollama serve

This starts the service in the foreground and prints logs directly in the terminal, which is useful for debugging. Configure the service with environment variables, for example:

OLLAMA_HOST=0.0.0.0:11434 OLLAMA_CONTEXT_LENGTH=8192 ollama serve

Run ollama serve --help to see all available environment variables. Common ones are listed in Environment variables and configuration.

push

Share a model you created on ollama.com:

ollama signin
ollama cp my-assistant your-account/my-assistant
ollama push your-account/my-assistant

Connect to Ollama on another computer

The CLI connects to the local service by default. Set OLLAMA_HOST to connect to another host:

OLLAMA_HOST=192.168.1.50:11434 ollama list

Common command combinations

# See what's currently loaded, then unload it
ollama ps
ollama stop qwen3:8b

# Remove models you don't need
ollama list
ollama rm model-you-dont-need

# Update all downloaded models (macOS / Linux)
ollama list | tail -n +2 | awk '{print $1}' | xargs -n1 ollama pull

Updated October 12, 2026