[ollama] 常用命令
显示模型信息:
ollama show <model_name>
例如:
例
列出所有模型:
ollama list
或ollama ls
例如:
root@ubuntu-server:~# ollama list
NAME ID SIZE MODIFIED
deepseek-r1:7b 0a8c26691023 4.7 GB 11 minutes ago
下载模型:
ollama pull <model_name>
例如:
root@ubuntu-server:~# ollama pull deepseek-r1:7b
pulling manifest
pulling 96c415656d37... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.7 GB
pulling 369ca498f347... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████▏ 387 B
pulling 6e4c38e1172f... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████▏ 1.1 KB
pulling f4d24e9138dd... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████▏ 148 B
pulling 40fb844194b2... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████▏ 487 B
verifying sha256 digest
writing manifest
success
运行模型:
ollama run <model_name>
例如:
root@ubuntu-server:~# ollama run deepseek-r1:7b
>>> Send a message (/? for help)
列出正在运行的模型:
ollama ps
例如:
root@ubuntu-server:~# ollama ps
NAME ID SIZE PROCESSOR UNTIL
deepseek-r1:7b 0a8c26691023 6.0 GB 100% GPU 4 minutes from now
删除模型:
ollama rm <model_name>
例如:
root@ubuntu-server:~# ollama rm deepseek-r1:7b
deleted 'deepseek-r1:7b'
查看版本信息:
ollama -v
或ollama --version
例如:
root@ubuntu-server:~# ollama --version
ollama version is 0.5.11
[ollama] 常用命令
https://blog.onanii0721.website//archives/ollama-chang-yong-yu-ju