> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/zh/kai-shi-shi-yong/install/linux.md).

# 在 Linux 上安装 Unsloth

要在 Linux 上安装 Unsloth Desktop，请按以下步骤操作。

{% stepper %}
{% step %}

### 下载

### <a href="https://unsloth.ai/download/linux" class="button primary">下载适用于 Linux 的 Unsloth</a>

{% endstep %}

{% step %}

### 安装

1. 打开 Unsloth 安装程序（`.deb` 文件）
2. 选择安装
3. 启动应用并等待安装完成
   {% endstep %}

{% step %}

### 选择模型

打开“选择模型”或“模型中心”，选择一个模型和量化方式，然后下载。完成后即可开始聊天——无需任何设置。

<figure><img src="/files/ee716919ab359455030e8acd4d55b5ec13ca328d" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Unsloth 现在已准备就绪

要开始聊天，请输入消息并按 Enter。

* **连接工具：** [Claude Code](/docs/zh/ji-chu-zhi-shi/claude-code.md), [Codex](/docs/zh/ji-chu-zhi-shi/codex.md)、网页搜索、 [MCP](/docs/zh/ji-chu-zhi-shi/mcp.md) 等等
* **训练模型：** 微调文本、扩散、嵌入等更多内容
* **生成媒体：** 在本地创建并训练图像、视频、TTS

<figure><img src="/files/b0dfb852351654c29812a5aa23885913432eaa10" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### 高级安装

对于开发版、每夜版 Unsloth Studio 或基于代码的 Unsloth Core，请使用这些选项。

#### 从主仓库安装 Unsloth Studio

```bash
git clone https://github.com/unslothai/unsloth
cd unsloth
./install.sh --local
unsloth studio -H 0.0.0.0 -p 8888
```

#### 安装每夜版 Unsloth Studio

```bash
git clone https://github.com/unslothai/unsloth
cd unsloth
git checkout nightly
./install.sh --local
unsloth studio -H 0.0.0.0 -p 8888
```

#### 使用 uv 安装 Unsloth Core

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv unsloth_env --python 3.13
source unsloth_env/bin/activate
uv pip install unsloth --torch-backend=auto
```

或者直接安装最新的 pip 版本：

```bash
pip install unsloth
```

要使用 Unsloth 安装 vLLM：

```bash
uv pip install unsloth vllm --torch-backend=auto
```

有关虚拟环境、CUDA 和 Torch 专用命令以及高级 pip 选项：

[**查看高级 pip 安装指南**](https://unsloth.ai/docs/get-started/install/pip-install)

### 手动安装 Unsloth Studio

下面的命令将安装 **Unsloth Studio**，这是基于浏览器的 Web 界面。它不会安装原生桌面应用。

```bash
curl -fsSL https://unsloth.ai/install.sh | sh
```

使用相同的命令更新 Unsloth Studio。

#### 启动 Unsloth Studio

```bash
unsloth studio -H 0.0.0.0 -p 8888
```

有关详细的 Unsloth Studio 安装说明和要求， [查看 Unsloth Studio 指南](https://unsloth.ai/docs/new/studio/install).

### 卸载

#### Unsloth Desktop

**Ubuntu 或 Debian（`.deb`)**

1. 如果 Unsloth 正在运行，请将其关闭。
2. 移除软件包：

```bash
sudo apt remove unsloth
```

**AppImage**

1. 如果 Unsloth 正在运行，请将其关闭。
2. 删除已下载的 `.AppImage` 文件。

卸载 Unsloth Desktop 不会删除已下载的模型或您的文件。

#### Unsloth Studio（手动安装）

运行 Linux 卸载脚本：

```bash
curl -fsSL https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.sh | sh
```

这将移除 Unsloth Studio、其 CLI 命令、启动器数据以及 Linux 桌面快捷方式。它不会删除已下载的 Hugging Face 模型。

#### 删除已下载的模型文件

默认的 Hugging Face 缓存位置是：

```bash
~/.cache/huggingface/hub/
```

如果 `HF_HUB_CACHE`, `HF_HOME`，或 `XDG_CACHE_HOME` 已设置，请改用该位置。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://unsloth.ai/docs/zh/kai-shi-shi-yong/install/linux.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
