Category Archives: Linux

Linux command reference, and other misc.

Linux – User Commands (finding users registered in the system)

Find all users and services registered in the system:

cat /etc/passwd

Find all users registered in the system:

cat /etc/passwd | grep “/home”

To add a user to a group:

usermod -G<group> <user>

To delete a user and their home directory: (Users can have a “home” directory)

userdel -r <user>

Things i came across setting up VPS (servers) on linux.  In the midst of creating a domain i created users and webmin failed on me, and when i fixed the issue webmin failed on me again saying this user was already existed on the unix system.  Please feel free to comment.

Related Posts

Related Posts

Linux commands – Groups

Find the groups the current user is in:


You can also find groups other users are in:

groups root

groups <user>

how to find all users of a group:

egrep "^groupname" /etc/group