Transferred from: http://www.jb51.net/linux/sudo.htm
——————————————————————————————————
Name: sudo
Usage rights: Users who are present in the/etc/sudoers
How to use: sudo-v
Sudo-h
Sudo-l
Sudo-v
Sudo-k
Sudo-s
Sudo-h
sudo [-b] [-P prompt] [-u username/#uid]-S
sudo command
Description: Executes the instruction as a system administrator, that is, instructions executed via sudo appear to be executed by the root himself.
Parameters:
-V Show version number
-H will show the version number and instructions for how to use it
-L Displays the permissions of itself (the user who executes sudo)
-V because Sudo does not execute in the first execution or in n minutes (n preset is five) will ask the password, this parameter is to confirm again, if more than n minutes, will also ask the password
-K will force the user to ask the password the next time sudo is executed (whether or not more than N minutes)
-B The instruction to be executed is placed in the background execution
-P Prompt can change the prompt for password, where%u will be substituted for the user's account name,%H will display the host name
-U username/#uid do not add this parameter, which means to execute the instruction as root, and add this parameter, you can execute the instruction as username (#uid is the user number of the username)
-S executes the shell specified by the shell in the environment variable, or the shell specified in the/etc/passwd
-h Specifies the home (home directory) in the environment variable as the user's home directory where you want to change the identity (if you do not add the-u parameter is the system administrator root)
command to execute AS System administrator (or change to other person with-u)
Example:
Sudo-l List the current permissions
SUDO-V listing version information for sudo
Linux Instructions: User Management--sudo