28 April 2019

Linux User Information and Management

Linux User Information and Management

Display the user and group ids of your current user:
id
Display the last users who have logged onto the system:
last
Show who is logged in and what they are doing:
w
who
Create a group named "developers":
groupadd developers
Create an user account with a comment and create the user's home directory:
useradd -c "John Doe" -m johndoe
Delete user account:
userdel johndoe
Add user account to the developers group:
usermod -aG developers johndoe