Run your first model on Linux
This takes about ten minutes, most of it waiting for a download. You need a 64-bit Linux install with curl, sudo rights and about 10 GB of free disk space.
Step 1: Check your memory
Paste this into a terminal:
free -h nvidia-smi --query-gpu=name,memory.total --format=csvThe Mem row of the first command is your system memory. The second prints your NVIDIA card's name and memory in MiB, if you have one. Divide by 1024 for GB.
If you have an NVIDIA card, use its memory to find your row. If you do not, use system memory. It decides which model you download in step 3.
What your memory can run Your memory Model class Suggested model Download Time at 100 Mbit/s 8 GB Small, up to about 4B Qwen3 4B about 2.5 GB about 3 min 16 GB Small, up to about 8B Qwen3 8B about 5 GB about 7 min 24 GB and up Mid, about 20B gpt-oss-20b about 13 GB about 17 min As of 27 Nov 2026 · Picks are editorial. Sizes are 4-bit builds.
Without a graphics card, start with the 8 GB row whatever your memory. On a CPU, smaller runs faster.
Step 2: Install one app
Install Ollama with its official script from ollama.com:
curl -fsSL https://ollama.com/install.sh | shThe script downloads Ollama, sets it up as a background service and detects NVIDIA or AMD graphics. It asks for your sudo password. Ollama is free and open source, and it runs entirely from the terminal.
Check it worked:
ollama --versionIf you would rather have a window with a chat box, LM Studio ships a Linux AppImage at lmstudio.ai. Once it is open, steps 3 and 4 match the Windows page.
Step 3: Download the suggested model
Pull the model for your row. Ollama names its builds with a colon and a size tag:
ollama pull qwen3:4b # 8 GB row ollama pull qwen3:8b # 16 GB row ollama pull gpt-oss:20b # 24 GB and upRun only the line for your row. Ollama's default builds are 4-bit, the same as the table.
The download is the slow part. The table shows the size and a rough time on a 100 Mbit/s connection. After this, everything runs offline.
The catchA model bigger than your VRAMVRAMMemory on a graphics card. On a PC with a GPU, it is your model budget.Read more still runs. Ollama splits it between the card and system memory, and the part on the CPU runs many times slower. Stay in your row until you have seen what full speed feels like.
Step 4: Say hello
Start a chat with the model you pulled, for example:
ollama run qwen3:8bAt the
>>>prompt, paste this and press Enter:Try itIn two sentences, explain what a token is. Then write a four-line poem about a laptop that thinks.A good response starts within a few seconds and streams in word by word. It explains tokensTokenA chunk of text, usually part of a word. Models read and write in tokens.Read more as pieces of words, then gives you a short poem. The wording will differ every time you ask.
Type
/byeto leave.Qwen3 is a reasoning model, so it may show its thinking before the answer. That is normal.
If text is appearing, you are running AI on your own machine. Nothing you typed left the computer.
What just happened
You downloaded a model, which is one large file of numbers. Ollama is a runtime, the software that loads the model and does the maths on your GPU or CPU. The model wrote its answer one token at a time, and the speed you saw is how fast your memory can feed it.
If it did not work
Ollama says it could not connect, or asks if it is running. The background service is not up. Start it with sudo systemctl start ollama, then try again. systemctl status ollama shows why it stopped.
Answers are slow on a machine with a graphics card. Ollama is running on the CPU. Check the driver as in the notes below, then run ollama ps while a model is loaded, and the processor column should say GPU. More fixes in Why is my GPU not being used?.
The pull fails or stops. Check free space with df -h ~. Then run the same ollama pull line again. It resumes where it stopped.
Anything else is in Troubleshooting and reference.
Linux notes
The install is one line. Everything else depends on your GPU driver, so check it before you blame Ollama.
For NVIDIA, install the proprietary driver from your distribution's own tool, such as Additional Drivers on Ubuntu. Then run:
nvidia-smiIf it prints a table naming your card and a driver version, you are fine. If the command is missing or reports it cannot talk to the driver, Ollama will fall back to the CPU. Which NVIDIA card should I get? covers card choice.
For AMD, Ollama uses ROCm, which supports a specific list of cards. Check yours against Ollama's GPU docs before you expect it to be used. Do AMD and Intel work for local AI? has the details.
On a graphics card, VRAM is your budget. Without one, system memory is the budget and speed is the limit.
Go deeperThat's enough
Seeing your speed
Add --verbose to the run command and Ollama prints timing after every answer:
ollama run qwen3:8b --verboseThe eval rate line is how fast it wrote, in tokens per second. Compare it with the speeds in How fast is fast?.
Where Ollama keeps things
The install script creates an ollama system service and a user for it. Models pulled by the service live in that user's data directory, not your home folder. ollama list shows what you have and how big each one is, and ollama rm followed by a name deletes one.
Talking to it from code
The service also listens on port 11434 for programs on your machine. Any tool that speaks the OpenAI API can use it. How do I call a local model from code? shows how, and How do I use Ollama? covers the rest of the commands.