What are the most common user management commands?

The most common user management commands in Linux include:

  1. Add a new user:

    sudo adduser username
  2. Delete a user:

    sudo deluser username
  3. Modify a user:

    sudo usermod options username
  4. Change a user's password:

    sudo passwd username
  5. View user information:

    id username
  6. List all users:

    cat /etc/passwd
  7. Add a user to a group:

    sudo usermod -aG groupname username
  8. Remove a user from a group:

    sudo gpasswd -d username groupname
  9. Lock a user account:

    sudo usermod -L username
  10. Unlock a user account:

    sudo usermod -U username

These commands are essential for managing user accounts, their permissions, and overall system security in a Linux environment.

0 Comments

no data
Be the first to share your comment!