This is a minimal command-line setup for running a local LLM with Ollama on macOS.
My environment
MacBook Pro, Apple M2 Max, 32 GB RAM
First terminal
Install Ollama and start the local Ollama server:
brew install ollama
ollama serve
Keep this terminal open. ollama serve runs the local API on port 11434.
Second terminal
# check that Ollama is reachable
curl http://localhost:11434/api/tags
# download and run the model
ollama run qwen3:4b
The first run downloads the model if it is not already present. Then you get an interactive prompt:
>>>
Now you can write your question directly at the prompt in the second terminal.
Test my very first prompt
>>> Write Python code that prints numbers from 1 to 10.
...done thinking.
Here's a Python code that prints numbers from 1 to 10 (inclusive), one per line:
for num in range(1, 11):
print(num)
**How it works:**
- `range(1, 11)` generates numbers starting from `1` up to (but not including) `11`
- This ensures we get the numbers: `1, 2, 3, 4, 5, 6, 7, 8, 9, 10`
- The `for` loop iterates through each number and prints it on a new line
Done…
Conclusion
I was really surprised by how easy it was.