1 Star 0 Fork 4.9K

mayongdong / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
su.md 3.38 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

su

Command Function

This command is used to switch the user.

Syntax

su [uid] [gid]

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

uid

Indicates the ID of the target user.

  • Left blank
  • [0, 60000]

gid

Indicates the ID of the target user group.

  • Left blank
  • [0, 60000]

Usage

  • The su command is used to switch to user root by default. The default value for both uid and gid is 0.
  • If the uid and gid parameters are specified, this command can switch to the user with the specified uid and gid.
  • If the input parameter is out of the range, an error message is printed.

Example

Enter su 1000 1000.

Output

Figure 1 Switching to the user whose uid and gid are both 1000

1
https://gitee.com/mayongdongsmile/docs.git
git@gitee.com:mayongdongsmile/docs.git
mayongdongsmile
docs
docs
master

搜索帮助