The method of adding Sudo access right on Ubuntu
Today Xiaobian shared with you is the method of adding Sudo access rights on Ubuntu. The sudo command is designed to allow users to run programs with the security rights of other users. By default, it is the root user. For everyone to understand better, look down together.
Configure Sudo access
Simply add a user (e.g. xxsl) to the sudo group to have Sudo access
By default, on Ubuntu systems, members of the sudo group are granted sudo access. To add a user to the sudo group, use the usermod command:
usermod -aG sudo xxsl
Test sudo access
Run whoami with sudo command:
sudo whoami
Output:
root
If the user has sudo access, the output of the whoami command will be root.
How to use sudo?
To use sudo, simply precede the command with sudo and a space, for example:
sudo ls -l /root
Note: If this is the first time using sudo, the system will prompt for the user password:
[sudo] password for username:
About the method of adding Sudo access rights on Ubuntu is shared here, of course, not only the above and everyone's analysis methods, but Xiaobian can ensure that its accuracy is absolutely no problem. Hope that the above content can have a certain reference value for everyone, can learn to apply. If you like this post, share it with more people.