Linux user management commands create, modify, and delete user accounts and groups. Similarly, these commands are used to manage user account properties such as login shells, primary groups, and passwords.
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
User Management Command Cheat Sheet.pdf
1. TOP MENU
Apr 23, 2023 Facebook
Twitter
LinkedIn
fa-you
JOIN TO OUR FACEBOOK GROUP
MAIN MENU
Cheat Sheets Linux
User Management Command Cheat Sheet
Last updated on April 11th, 2023 - by John Gomez - Leave a Comment
Linux user management commands create, modify, and delete user accounts and
groups. Similarly, these commands are used to manage user account properties
such as login shells, primary groups, and passwords. User management
commands help system administrators control access to resources and manage
user permissions on Linux systems to ensure security and accessibility.
Command Description
useradd
By using this command, you can create a new user account on
the system.
usermod
This command is used to modify an existing user account, such
as changing the user's password or group membership.
userdel
This command is used to delete an existing user account from
the system.
passwd This command is used to change a user's password.
groupadd This command is used to create a new group on the system.
groupmod
This command is used to modify an existing group, such as
changing the group's name or membership.
groupdel
This command is used to delete an existing group from the
system.
Page 1 of 6
2. Command Description
id
This command is used to display information about a user or
group, including their user ID and group membership.
chown This command is used to change the owner of a 몭le or directory.
chgrp
This command is used to change the group ownership of a 몭le or
directory.
chmod
This command is used to change the permissions of a 몭le or
directory.
su
This command is used to switch to another user account or
become a superuser.
sudo
This command is used to execute a command with elevated
privileges.
whoami
This command is used to display the username of the current
user.
w
This command is used to display information about logged-in
users and their activity on the system.
몭nger [username]
Displays detailed information about a user, including their login
name, home directory, and shell.
last
Displays information about the last logged-in users on the
system.
who
Displays information about currently logged-in users in the
system.
adduser
[username]
Create a new user account with interactive prompts to enter user
details.
deluser [username] Deletes a user account and their home directory from the system.
newgrp
[groupname]
Change the user's primary group membership to a new session.
usermod -aG
[groupname]
[username]
Adds a user to an additional group.
chsh -s [shellpath]
[username]
Change the user's login shell.
chfn [username]
Change the user's full name and other details in the system
password 몭le.
Page 2 of 6
3. Command Description
Comment *
Leave a Reply
Your email address will not be published. Required 몭elds are marked *
visudo
Edit the sudo con몭guration 몭le, which controls which users can
execute commands with elevated privileges.
About John Gomez
John Britto Founder & Cheif-Editor @LinuxTeck. A Computer Geek and Linux
Intellectual having more than 10+ years of experience in Linux and Open Source
technologies.
View all posts by John Gomez →
RELATED POST
Docker Management Command Cheat Sheet
April 16,2023
Linux Database Management Command Cheat Sheet
April 14,2023
Linux System Initialization Command Cheat Sheet
April 14,2023
PREVIOUS ARTICLE
Linux System Information Command Cheat
Sheet
NEXT ARTICLE
Linux Network Command Cheat Sheet
Page 3 of 6
4. Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
POST COMMENT
TRENDING
Linux Package Management Command Cheat Sheet
How to set up FTP server in Rocky Linux 8.4
How to secure FTP Server with SSL/TLS in Rocky Linux
How to set up an SFTP server on Rocky Linux 8
How to set up MariaDB on Rocky Linux 8
How to Install and use phpMyAdmin on Rocky Linux
How to Install Rocky Linux 9 {Step by Step} with Screenshots
Page 4 of 6