Skip to main content

User commands

Linux commands for handling users and roles:

  • adduser name //Adds a new user interactivly (creates a default shell and home directory)
  • deluser name //Removes a user
  • deluser --remove-home name //Removes a user and also deletes their home directory
  • usermod -aG group name //Give a user a role, such as sudo
  • passwd name //Set the password for a given user, or if no user is supplied for the current user
  • groups //List out all groups on the system
  • users //List out all users on the system