How to install Ollama on Linux and run your first AI model

One command downloads and runs a model. Good if you are comfortable with a terminal, or want other apps and coding tools to use your local model. These steps use Qwen3 8B as the example; swap in any model.

Step by step

You need: Most 64-bit distributions. For an NVIDIA card install the proprietary driver first; AMD cards use ROCm, which the installer sets up.

  1. Open a terminal and install Ollama with the official script:
  2. curl -fsSL https://ollama.com/install.sh | sh
  3. The installer sets Ollama up as a background service. Then download and start Qwen3 8B:
  4. ollama run qwen3:8b
  5. When you see >>>, type a message and press Enter. Type /bye to quit.

That's it: you're running AI on your own computer. If something goes wrong, see the fixes below.

Not sure which model?

Answer two questions and get the model that fits your hardware, with these steps filled in for it.

Prefer LM Studio?

Easiest for beginners. A normal app with a chat window: you search for a model, click download, and start typing. No commands.

LM Studio on Linux

Which model to try first

The best everyday chat model that runs at a comfortable speed for each amount of graphics memory. Copy the command to download and run it.

Your GPUModelCommand
8 GB graphics cardQwen3 8Bollama run qwen3:8b
12 GB graphics cardGemma 3 12Bollama run gemma3:12b
16 GB graphics cardgpt-oss 20Bollama run gpt-oss:20b
24 GB graphics cardQwen3 32Bollama run qwen3:32b
32 GB graphics cardQwen3 32Bollama run qwen3:32b

Frequently asked questions

Is Ollama free?

Yes. Ollama is free to download and use, and so are the models in this guide.

Does Ollama on Linux need the internet?

Only to download the app and the model. After that, chats run entirely on your computer and work offline.

How much space do I need for Ollama?

The app itself is small. Each model is a separate download, typically 2 to 20 GB; Qwen3 8B is about 5 GB.