Skip to content

User management

Please note that you need to replace [username] with the actual username in this commands here

To add a new user to your system, make sure that you’re running the following commands with sudo or you’re logged in as root:

adduser [username]

To grant them superuser privileges, you need to add them to the sudo group, using this command:

usermod -aG sudo [username]

You can combine those two commands into one by specifying the group name as a parameter for the adduser command:

adduser [username] sudo

To delete an user, use this command:

deluser [username]

To list all users, use this command:

cut -d: -f1 /etc/passwd




Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.