How To List All Users and Groups in Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-users-groups-linux/
PINTEREST
PINTEREST
INSTAGRAM

Users and group files are important for linux. Normal users will interact with linux systems by using credentials provided in the user ad group file.

Print User File Named passwd

We can get content of the user file like below.  This file provides usernames home directories and shell information.

Print User File Named passwd
Print User File Named passwd

Print Only Usernames

We can print only usernames by filtering other columns like below.

Print Only Usernames
Print Only Usernames

Print Users Who Have Login

We can print only users who have login right

Print Users Who Have Login
Print Users Who Have Login

Print Users Who Have Home Directories

We can print only users who have home directories in /home. This command will first look in to the passwd to list users how have /home and then print only user names from result.

Print Users Who Have Home Directories
Print Users Who Have Home Directories

Print Group File

We can print group file like below

Print Group File
Print Group File

Print Only Group Names

We can print only group names by cutting other column like below.

Print Only Group Names
Print Only Group Names

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-users-groups-linux/
PINTEREST
PINTEREST
INSTAGRAM
LEARN MORE  Vi/Vim Save And Quit