> For the complete documentation index, see [llms.txt](https://help.titanapp.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.titanapp.info/titan-network-zhong-wen/4-ce-jia-li-le-ce-shi-wang/titan-agent-an-zhuang-jiao-cheng/linux-xi-tong/qi-yong-cgroups-v1-jian-rong-mo-shi.md).

# 启用 cgroups v1 兼容模式

### 背景说明

本教程适用于 **Ubuntu/Debian/Windows 等使用 GRUB 引导的系统**，通过修改 GRUB 内核参数 `systemd.unified_cgroup_hierarchy=0`，强制系统使用 cgroups v1 层级模式。

***

### 操作步骤

* 若您是**Windows**系统，请输入以下命令进入multipass虚拟机，再继续操作。&#x20;

  进入cmd命令行，输入：

  ```
  multipass shell ubuntu-pedge
  ```
* 若您是**Ubuntu/Debian**系统，则忽略此步骤

#### 1. 编辑 GRUB 配置文件

**命令操作**

```bash
sudo vim /etc/default/grub
```

**修改内容**

找到 `GRUB_CMDLINE_LINUX` 参数行，**追加**以下内容（保留原有参数，以空格分隔）：

```diff
- GRUB_CMDLINE_LINUX="..."
+ GRUB_CMDLINE_LINUX="... systemd.unified_cgroup_hierarchy=0"
```

**完整示例**

修改后的行可能类似（具体参数因系统而异）：

```bash
GRUB_CMDLINE_LINUX="quiet splash systemd.unified_cgroup_hierarchy=0"
```

**注意事项**

* 如果参数已存在，请勿重复添加
* 修改前建议备份原文件

***

#### 2. 生成新 GRUB 配置并重启

**更新 GRUB 配置**

```bash
sudo update-grub
```

此命令将生成 `/boot/grub/grub.cfg` 文件，使修改生效。

**重启系统**

```bash
sudo reboot
```

***

通过此教程，您已成功将 cgroups 切换至 v1 模式。


---

# 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:

```
GET https://help.titanapp.info/titan-network-zhong-wen/4-ce-jia-li-le-ce-shi-wang/titan-agent-an-zhuang-jiao-cheng/linux-xi-tong/qi-yong-cgroups-v1-jian-rong-mo-shi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
