Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of adding Sudo access right on Ubuntu

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report