Finding All Users and Groups In Linux Machine


We have lot of commands for user management like useradd ,passwd but there is no separate command for finding all users in our Linux machine , But one powerful command is ‘cut’ with some options we can find all users on our system

1) Displaying All users (need root mode)
cut -d : -f 1 /etc/passwd
2) Displaying all groups
cut -d : -f 1 /etc/groups

No comments:

Post a Comment