0% found this document useful (0 votes)
6 views

Users & Groups - Linux Command Library

Uploaded by

abinadabhp13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Users & Groups - Linux Command Library

Uploaded by

abinadabhp13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

12/2/24, 10:10 Users & Groups | Basic | Cheat sheet | Linux Command Library

LINUX COMMAND LIBRARY

BASICS TIPS COMMANDS

Users & Groups


Create group Grant sudo privileges to an
$ groupadd [name] existing user
$ addgroup [name] $ usermod -a -G sudo [user]
$ adduser [user] sudo

Delete group
$ groupdel [name]
User information
$ finger [user]

Rename group
$ groupmod - Add existing user to group
n [newGroupname] [oldGroupname] $ usermod -aG [groupName] [userName]
$ adduser [userName] [groupName]
Create user $ gpasswd -a [userName] [groupName]
$ useradd [name]
$ adduser [name] Add new user to group
$ useradd -G [group] [user]
Delete user
$ userdel [name] Remove user from group
$ deluser [name] $ gpasswd -d [user] [group]
$ deluser [user] [group]
Rename user
$ usermod - List all groups
l [newUsername] [oldUsername]
$ getent group
$ cat /etc/group
Set user password
$ passwd [name]

https://linuxcommandlibrary.com/basic/usersgroups 1/2
12/2/24, 10:10 Users & Groups | Basic | Cheat sheet | Linux Command Library

List all users


$ getent passwd
$ cat /etc/passwd

All man pages are copyrighted by their respective authors. Thanks to TLDR and commandlinefu.com
Simon Schubert - [email protected]

My other projects:

https://linuxcommandlibrary.com/basic/usersgroups 2/2

You might also like