Stands for replace consumer. This command is used to change consumer and shall we exceuting command with the privilage of that consumer. It simplifies, normally for administrator, to regulate customers. As a substitute of logging to shell for separate customers and classes, admin can login with their very own account and turn to sepcific consumer with their username.
Common syntax for
$ su [OPTIONS] [USER [ARGUMENT...]]
Login with a unique consumer account
Cross the username to the
su command, and it’ll supply a login consultation when the password has been verified.
Instance: Login with a unique username newone.
Login with a unique consumer account + run a command
su [username] -c [command]
-c possibility lets you run a selected command below a unique consumer account and show the ends up in the present login consultation.
Instance: Operating the
ls command below any other consumer account newone and showing it within the ubuntu login consultation.
Specify the shell
su -s /bin/[shell]
-s approach to alternate an present default shell to another one.
Instance: The usage of the command to open the root consumer account within the Z shell (zsh).
Keep consumer account atmosphere
su Ã¢Â€Â“p [another_user]
-p possibility lets you stay the surroundings of the present consumer account.
Instance: Switching username consumer to consumer newone. And showing the house listing to turn that it stays the similar.WordPress Website Development