A headless Linux server needs model files on disk before LM Studio can load them. The lms CLI downloads a selected model and quantization through llmster without the desktop app.
GGUF models come in quantized variants with different file sizes and memory needs. Selecting a quantization explicitly prevents an automatic download choice from changing the model footprint.
Downloads belong to the user running llmster and stay in LM Studio's model directory. A completed download appears in the local inventory; loading it into memory is a separate operation.
Steps to download a model with lms in LM Studio on Linux:
- Download the official llmster installer.
$ curl -fsSL https://lmstudio.ai/install.sh -o llmster-install.sh
If llmster is already installed, the installation steps can be skipped. The remaining commands run under the account that owns its model directory.
- Review the downloaded installer before running it.
$ less llmster-install.sh
The q key closes less. This script executes vendor code, downloads the Linux package, and updates the current user's shell profiles.
Related: Official llmster installation documentation - Install llmster under your normal Linux account.
$ TMPDIR="$HOME" PATH="$PATH:/usr/sbin:/sbin" bash llmster-install.sh
The installer downloads several gigabytes and checks the archive checksum. TMPDIR keeps the download and unpacked files on the home filesystem instead of a potentially small, memory-backed /tmp. The temporary PATH addition makes ldconfig discoverable on Ubuntu and Debian. A missing libgomp warning concerns model loading; it does not prevent downloading model files.
- Remove the downloaded installer script.
$ rm llmster-install.sh
- Add lms to the current shell's PATH.
$ export PATH="$HOME/.lmstudio/bin:$PATH"
The installer also updates shell profiles for future sessions.
- Start the llmster daemon.
$ lms daemon up
- Check the models already stored locally.
$ lms ls
An existing embedding model may appear even before an LLM has been downloaded. Downloads normally use ~/.lmstudio/models unless the model directory has been changed.
- Download the public Qwen2.5 0.5B Instruct model in Q4_K_M quantization. Example output:
$ lms get \ https://huggingface.co/lmstudio-community/Qwen2.5-0.5B-Instruct-GGUF@q4_k_m \ --gguf --yes ##### snipped ##### Download completed.The full repository URL avoids an ambiguous search result. The suffix @q4_k_m selects the quantization, --gguf restricts the format, and --yes approves the download without a prompt. This file needs about 398 MB of disk space. Other public repositories and quantizations can replace the URL and suffix.
Related: Qwen2.5 model card and files
Related: LM Studio model download command reference - Confirm that the downloaded model appears in the local LLM inventory. Example output:
$ lms ls --llm You have 1 models, taking up 397.81 MB of disk space. LLM PARAMS ARCH SIZE DEVICE qwen2.5-0.5b-instruct 0.5B Qwen2 397.81 MB Local
The model name and size should match the download. A missing entry means the model is not yet available locally; download progress alone is insufficient.