All Ollama Commands for Windows and Mac
Terminal commands 50
Type in TerminalType in PowerShellWhat it does
Everyday
ollama run gemma4Downloads a model and starts a chat.
ollama run gemma4 "Why is the sky blue?"Asks one question and exits.
ollama pull gemma4Downloads or updates a model.
ollama listShows the models you have.
ollama psShows models loaded in memory.
ollama stop gemma4Unloads a model from memory.
ollama rm gemma4Deletes a model.
ollama show gemma4Shows a model's size and details.
ollama --versionShows your Ollama version.
ollama helpLists every command.
Run options
ollama run gemma4 --verboseShows the speed after each reply.
ollama run gemma4 --think=falseTurns thinking off.
ollama run gemma4 --think=highThinks harder, on models that can.
ollama run gemma4 --hidethinkingHides the thinking text.
ollama run gemma4 --format jsonReplies in JSON.
ollama run gemma4 --keepalive 30mKeeps the model loaded for 30 minutes.
ollama run gemma4 --nowordwrapStops wrapping long lines.
cat notes.txt | ollama run gemma4 "Summarize this"Get-Content notes.txt | ollama run gemma4 "Summarize this"Asks about a text file.Asks about a text file.
ollama run gemma4 "What's in this image? /Users/you/Desktop/photo.png"ollama run gemma4 "What's in this image? C:\Users\you\Desktop\photo.png"Asks about a picture.Asks about a picture.
Special models
ollama run embeddinggemma "Hello world"Turns text into embeddings.
ollama run phonon "Hello from Ollama."Reads text out loud.
ollama run phonon --voice Zoey "Hi, this is Zoey."Reads it in another voice.
ollama run nimble --ask "Is a refund being requested?" < ticket.txtGet-Content ticket.txt | ollama run nimble --ask "Is a refund being requested?"Answers yes or no about a file.Answers yes or no about a file.
ollama run nimble --ask "Which team should handle this?" --choice billing="Payments" --choice technical="Software" < ticket.txtGet-Content ticket.txt | ollama run nimble --ask "Which team should handle this?" --choice billing="Payments" --choice technical="Software"Picks a label for a file.Picks a label for a file.
Custom models
ollama create mymodel -f ModelfileMakes your own model from a Modelfile.
ollama cp gemma4 my-gemmaCopies a model under a new name.
ollama show gemma4 --modelfileShows a model's Modelfile.
ollama show gemma4 --parametersShows its settings.
ollama show gemma4 --templateShows its prompt template.
ollama show gemma4 --systemShows its system message.
ollama show gemma4 --licenseShows its license.
ollama show gemma4 -vShows every detail.
ollama push yourname/mymodelUploads your model to ollama.com.
Apps and account
ollama launchOpens a menu to pick a model or app.
ollama launch claudeRuns Claude Code on Ollama.
ollama launch claude --model qwen3.5Runs it with a model you pick.
ollama launch codexRuns Codex on Ollama.
ollama launch opencodeRuns OpenCode on Ollama.
ollama launch vscodeSets up VS Code chat.
ollama launch droid --configSets up an app without opening it.
ollama launch codex --restorePuts an app back to its own settings.
ollama signinSigns in to ollama.com.
ollama signoutSigns out.
Install and server
curl -fsSL https://ollama.com/install.sh | shirm https://ollama.com/install.ps1 | iexInstalls Ollama.Installs Ollama.
ollama serveStarts Ollama without the app.
open -a Ollama& "ollama app.exe"Opens the Ollama app.Opens the Ollama app.
curl http://localhost:11434curl.exe http://localhost:11434Checks if Ollama is running.Checks if Ollama is running.
curl http://localhost:11434/api/tagscurl.exe http://localhost:11434/api/tagsLists your models through the API.Lists your models through the API.
curl http://localhost:11434/api/generate -d '{"model":"gemma4","prompt":"Why is the sky blue?","stream":false}'(Invoke-WebRequest -method POST -Body '{"model":"gemma4","prompt":"Why is the sky blue?","stream":false}' -uri http://localhost:11434/api/generate).Content | ConvertFrom-JsonAsks a question through the API.Asks a question through the API.
which ollamawhere.exe ollamaShows where Ollama is installed.Shows where Ollama is installed.
Chat commands 36
Type in a chatType in a chatWhat it does
Basics
/?Shows the chat commands.
/? shortcutsShows the keyboard shortcuts.
/byeLeaves the chat.
/clearForgets the chat so far.
"""Starts and ends a message on many lines.
/load gemma4Switches to another model.
/save mychatSaves the chat as a new model.
Chat settings
/set system "Talk like a pirate."Gives the model a role.
/set thinkTurns thinking on.
/set think highSets how hard it thinks.
/set nothinkTurns thinking off.
/set verboseShows the speed after each reply.
/set quietHides the speed again.
/set format jsonReplies in JSON.
/set noformatGoes back to plain replies.
/set wordwrapWraps long lines.
/set nowordwrapStops wrapping long lines.
/set historyRemembers what you type.
/set nohistoryStops remembering what you type.
Model parameters
/set parameter num_ctx 8192Lets it remember more of the chat.
/set parameter temperature 0.7Higher is more creative.
/set parameter seed 42Gives the same answer every time.
/set parameter num_predict 500Limits how long replies get.
/set parameter top_k 40Picks from fewer likely words.
/set parameter top_p 0.9Picks from the most likely words.
/set parameter min_p 0.05Skips very unlikely words.
/set parameter repeat_penalty 1.1Repeats itself less.
/set parameter repeat_last_n 64How far back it checks for repeats.
/set parameter num_gpu 20Puts this many layers on the GPU.
/set parameter stop "User:"Stops the reply at this word.
Model info
/show infoShows the model's details.
/show parametersShows its settings.
/show systemShows its system message.
/show templateShows its prompt template.
/show modelfileShows its Modelfile.
/show licenseShows its license.
Keyboard shortcuts 12
Press in a chatPress in a chatWhat it does
Typing
Ctrl + AJumps to the start of the line.
Ctrl + EJumps to the end of the line.
Esc then BAlt + BMoves back one word.Moves back one word.
Esc then FAlt + FMoves forward one word.Moves forward one word.
Ctrl + WDeletes the word before the cursor.
Ctrl + UDeletes everything before the cursor.
Ctrl + KDeletes everything after the cursor.
Up and Down arrowsBrings back earlier messages.
Chat
Ctrl + CStops the reply.
Ctrl + DLeaves the chat.
Ctrl + LClears the screen.
Ctrl + GWrites your message in a text editor.
Settings 15
Type in TerminalType in PowerShellWhat it does
Change a setting
Quit and reopen Ollama after a change.
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"setx OLLAMA_HOST "0.0.0.0:11434"Lets other devices on your network use it.Lets other devices on your network use it.
launchctl setenv OLLAMA_MODELS "/Volumes/External/ollama-models"setx OLLAMA_MODELS "D:\ollama-models"Saves models to another drive.Saves models to another drive.
launchctl setenv OLLAMA_CONTEXT_LENGTH "8192"setx OLLAMA_CONTEXT_LENGTH "8192"Lets models remember longer chats.Lets models remember longer chats.
launchctl setenv OLLAMA_KEEP_ALIVE "24h"setx OLLAMA_KEEP_ALIVE "24h"Keeps models loaded for a day.Keeps models loaded for a day.
launchctl setenv OLLAMA_FLASH_ATTENTION "1"setx OLLAMA_FLASH_ATTENTION "1"Uses less memory on long chats.Uses less memory on long chats.
launchctl setenv OLLAMA_KV_CACHE_TYPE "q8_0"setx OLLAMA_KV_CACHE_TYPE "q8_0"Cuts chat memory use in half.Cuts chat memory use in half.
launchctl setenv OLLAMA_NUM_PARALLEL "2"setx OLLAMA_NUM_PARALLEL "2"Answers more requests at once.Answers more requests at once.
launchctl setenv OLLAMA_MAX_LOADED_MODELS "2"setx OLLAMA_MAX_LOADED_MODELS "2"Sets how many models stay loaded.Sets how many models stay loaded.
launchctl setenv OLLAMA_ORIGINS "chrome-extension://*,moz-extension://*,safari-web-extension://*"setx OLLAMA_ORIGINS "chrome-extension://*,moz-extension://*,safari-web-extension://*"Lets browser extensions connect.Lets browser extensions connect.
launchctl setenv OLLAMA_NO_CLOUD "1"setx OLLAMA_NO_CLOUD "1"Turns off cloud models and web search.Turns off cloud models and web search.
launchctl setenv OLLAMA_NOHISTORY "1"setx OLLAMA_NOHISTORY "1"Stops saving what you type in chats.Stops saving what you type in chats.
launchctl setenv OLLAMA_DEBUG "1"setx OLLAMA_DEBUG "1"Adds more detail to the logs.Adds more detail to the logs.
Check or undo a setting
launchctl getenv OLLAMA_HOST[Environment]::GetEnvironmentVariable("OLLAMA_HOST", "User")Shows a setting's value.Shows a setting's value.
launchctl unsetenv OLLAMA_HOST[Environment]::SetEnvironmentVariable("OLLAMA_HOST", $null, "User")Removes a setting.Removes a setting.
OLLAMA_HOST=0.0.0.0:11434 ollama serve$env:OLLAMA_HOST="0.0.0.0:11434"; ollama serveTries a setting once without saving it.Tries a setting once without saving it.
Files and logs 9
Type in TerminalType in PowerShellWhat it does
Logs
cat ~/.ollama/logs/server.logGet-Content "$env:LOCALAPPDATA\Ollama\server.log"Shows the server log.Shows the server log.
tail -f ~/.ollama/logs/server.logGet-Content "$env:LOCALAPPDATA\Ollama\server.log" -WaitWatches the log live.Watches the log live.
open ~/.ollama/logsexplorer "$env:LOCALAPPDATA\Ollama"Opens the logs folder.Opens the logs folder.
OLLAMA_DEBUG=1 ollama serve$env:OLLAMA_DEBUG="1"; & "ollama app.exe"Starts Ollama with detailed logs.Starts Ollama with detailed logs.
Models folder
open ~/.ollama/modelsexplorer "$env:USERPROFILE\.ollama\models"Opens the models folder.Opens the models folder.
du -sh ~/.ollama/models"{0:N1} GB" -f ((Get-ChildItem "$env:USERPROFILE\.ollama\models" -Recurse | Measure-Object Length -Sum).Sum / 1GB)Shows how much space models use.Shows how much space models use.
rm -rf ~/.ollamaRemove-Item -Recurse -Force "$env:USERPROFILE\.ollama"Deletes every model and setting.Deletes every model and setting.
Uninstall
sudo rm -rf /Applications/Ollama.appstart ms-settings:appsfeaturesRemoves the Ollama app.Opens Installed apps to remove Ollama.
sudo rm /usr/local/bin/ollamaRemoves the ollama command.