👾How to install LM Studio CLI in Linux Terminal

LM Studio CLI installation guide without a UI in a terminal instance.

  1. Open a new terminal to run LM Studio CLI, or use tmux

  2. Get LM Studioarrow-up-right or run below (1GB or so download size)

wget https://lmstudio.ai/download/latest/linux/x64?format=AppImage -O 'LM_Studio.AppImage'
chmod u+x ./LM_Studio.AppImage
  1. Run LM Studio via

You might see below:

If so, do the below instead:

  1. You then might see the below, especially if you are in a cloud instance with no desktop:

If so, install a "fake" desktop simulator within the terminal:

  1. Then use xvfb and launch LM Studio:

  1. Then get LM Studio's LMS / CLI in another terminal, or after CTRL+B+D for tmux

  1. Open a new terminal or tmux then run:

If you see -bash: lms: command not found please run lms in a new terminal window!

  1. Now download a model like Qwen3-Coder-Next like below. If downloads get stuck, see Hugging Face Hub, XET debugging

  1. We then import the model via:

You might see EEXIST: file already exists, symlink 'unsloth/Qwen3-Coder-Next-GGUF/UD-Q6_K_XL/Qwen3-Coder-Next-UD-Q6_K_XL-00001-of-00003.gguf' -> '~/.lmstudio/models/unsloth/Qwen3-Coder-Next-GGUF/Qwen3-Coder-Next-UD-Q6_K_XL-00001-of-00003.gguf' which just means you already have the model loaded in LM Studio.

You can also check all LM Studio models via:

  1. You can also get models via lms get via below:

You will then see:

Then load lms load qwen3-coder-next:

  1. Then start up LM Studio's server:

You will see Success! Server is now running on port 8001

  1. Then in a new terminal, use the model via the OpenAI compatible endpoint:

And we're done!

Last updated

Was this helpful?