Skip to main content

User and Group Management Commands in Linux

Linux is a multi-user operating system by default. System users, human users, groups and a lot more.

As a sysadmin, you should know how to get details of users on the system, modify their access, change their passwords or set a password policy and manage their groups.

You'll learn about various Linux commands that allow you to manage user accounts and groups in this section.

I recommend reading a little on the file ownership and groups. This will give you a better understanding on groups at least.

Linux File Permissions and Ownership Explained with Examples
Linux file permissions explained in simpler terms. Also learn how to change the file permissions and ownership in Linux in this detailed beginner’s guide.

After that, you may browse through the available commands.

User identification commands

The commands that let you find about the logged in users.

Command Description Example
who Lists all logged-in users who command
id Get user and group ID id command
finger Logged in user information finger command

User account management commands

These commands let you add, remove and modify user accounts on a Linux system.

Command Description Example
useradd Create a new user account useradd command
userdel Delete an existing user userdel command
usermod Modify user account usermod command
passwd Manage use passwords passwd command

Group management

Groups are an integral concept of Linux security structure. They also play a crucial role in who is eligible to access certain files on the system.

Command Description Example
groupadd Creates new groups groupadd command
groupdel Delete a group groupdel command
groupmod Modify group properties groupmod command