How to Install LM Studio to Run LLMs Offline in Linux

LM Studio is a user-friendly desktop application that allows you to download, install, and run large language models (LLMs) locally on your Linux machine.

Using LM Studio, you can break free from the limitations and privacy concerns associated with cloud-based AI models, while still enjoying a familiar ChatGPT-like interface.

In this article, we’ll guide you through installing LM Studio on Linux using the AppImage format, and provide an example of running a specific LLM model locally.

System Requirements

The minimum hardware and software requirements for running LM Studio on Linux are:

  • Dedicated NVIDIA or AMD graphics card with at least 8GB of VRAM.
  • A processor compatible with AVX2 and at least 16GB of RAM is required.

Installing LM Studio in Linux

To get started, you need to download the latest LM Studio AppImage from the official website or repository.

Download LM Studio AppImage
Download LM Studio AppImage

Once the AppImage is downloaded, you need to make it executable and extract the AppImage contents, which will unpack itself into a directory named squashfs-root.

chmod u+x LM_Studio-*.AppImage
./LM_Studio-*.AppImage --appimage-extract

Now navigate to the extracted squashfs-root directory and set the appropriate permissions to the chrome-sandbox file, which is a helper binary file that the application needs to run securely.

cd squashfs-root
sudo chown root:root chrome-sandbox
sudo chmod 4755 chrome-sandbox

Now you can run the LM Studio application directly from the extracted files.

./lm-studio
LM Studio On Ubuntu
LM Studio On Ubuntu

That’s it! LM Studio is now installed on your Linux system, and you can start exploring and running local LLMs.

Running a Language Model Locally in Linux

After successfully installing and running LM Studio, you can start using it to run language models locally.

For example, to run a pre-trained language model called GPT-3, click on the search bar at the top and type “GPT-3” and download it.

Download LLM Model in LM Studio
Download LLM Model in LM Studio
Downloading LLM Model
Downloading LLM Model

Once the download is complete, click on the “Chat” tab in the left pane. In the “Chat” tab, click on the dropdown menu at the top and select the downloaded GPT-3 model.

You can now start chatting with the GPT-3 model by typing your messages in the input field at the bottom of the chat window.

Load LLM Model in LM Studio
Load LLM Model in LM Studio

The GPT-3 model will process your messages and provide responses based on its training. Keep in mind that the response time may vary depending on your system’s hardware and the size of the downloaded model.

Conclusion

By installing LM Studio on your Linux system using the AppImage format, you can easily download, install, and run large language models locally without relying on cloud-based services.

This gives you greater control over your data and privacy while still enjoying the benefits of advanced AI models. Remember to always respect intellectual property rights and adhere to the terms of use for the LLMs you download and run using LM Studio.

Two small things before you go

If something didn’t work on your setup, leave a comment and tell me which distro and version you’re on. I read every one, and most of these articles got better because a reader pointed out what was missing.

And if it did work, share it. TecMint has stayed free for 14 years because people pass these articles around, and that traffic is what pays for writing the next one.

Leave a comment
Get two free Linux courses

Learn the Linux basics with two free courses and join 34,000+ readers getting practical TecMint tutorials and selected Pro TecMint articles every week.

Pro TecMint
Get lifetime access for $99

If you want to go beyond the free tutorials, Pro gives you 18 courses, 5 ebooks, and every future course I add. One payment, lifetime access, no renewals.

Ravi Saive
Ravi Saive
Administrator
About the author

I'm Ravi Saive, an award-winning entrepreneur and founder of several successful 5-figure online businesses, including TecMint.com, GeeksMint.com, UbuntuMint.com, and the premium learning hub Pro.Tecmint.com.

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.