Guide 7 of 20 / Linux & local AI
Running AI Locally with Ollama
Run a small local model, inspect resource use and keep the service on your own computer.
Install for your distribution
Ollama runs a local service that accepts requests from the CLI. Use its official Linux guide to choose the install method for your architecture. Check download size and review commands that need administrator rights. If the install created a system service, use that service. If you installed manually and no service is listening, run ollama serve in a separate terminal as your own user.
Download and test a small model
This example uses the local 1B variant of Llama 3.2. Check the model page, licence and available tags first. Downloading needs an internet connection and free disk space. The command that runs the model passes in a single prompt and prints its generated answer. Run ollama ps while the model is still loaded to inspect where it is running.
ollama --version
ollama pull llama3.2:1b
ollama list
ollama run llama3.2:1b "Write three steps for organising a folder of public recipes."
ollama ps
Troubleshoot a first run
If the CLI cannot connect, make sure the installed service is up or start it manually as described above. An address-in-use message can mean another service already owns the port. Verify before restarting anything. If the model stalls, reduce the context or start with a smaller model. Compare results against a short source you can check, since resource use and quality are separate considerations.
Use the local workflow wisely
A local model can keep a drafting task available and responsive even when an external service is busy. Leave the listener on the default loopback address for single-user use. Keep cloud model tags and online features out of an offline workflow. Files, front ends and other users on the same computer still matter for privacy.
Practical exercise
Give the model a three-sentence fictional notice and ask it to extract the deadline. Record the model tag, time for a first reply and whether the answer matches the notice. Change the deadline and check that the output changes.