---
title: "解决xxx is not in the sudoers file"
description: "首先切换到root用户，然后执行："
canonical_url: "https://yangqiuyi.com/blog/linux/jie-jue-xxx-is-not-in-the-sudoers-file"
---

> Index of every page on this site: [llms.txt](https://yangqiuyi.com/llms.txt)

首先切换到root用户，然后执行：

```sh
usermod -G sudo xxx
```

xxx 是需要加入sudoer的用户名

## Sitemap

See the full [sitemap](https://yangqiuyi.com/sitemap.md) for all pages.
