su
Command Function
This command is used to switch the user.
Syntax
su [uid] [gid]
Parameter Description
Table 1 Parameters
|
||
|
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