Linux Sudo command Usage and Benefits

Linux Sudo Commands

Linux sudo command use as system administrator, its execution on root. its allow to non – root user to run Linux administrator  command which is restricted for other user.  With using non root user can access the root account and can be control administrator.

List of Sudo Command

sudo -i

sudo -V

sudo -h

sudo -l

sudo -v

sudo -i

This command give you access of root shell in Linux. with use sudo -i command you can run any linux command as root user. After use leave the root shell use ‘exit’ command to exit root shell. User get a root environment without having to know root account password. its simpler work as sudo -su.

sudo -V

This command use for display the version number like php -V command show the php version.

sudo -h

This command displays the version number and instruction for use instructions.

sudo -l

This command show their own right. Its used to list user’s privileges.

sudo -v

This command update the user timestamp, prompt for user password if necessary.  Its extends the sudo timeout for another 5 minutes.