users – print the user names of users currently logged in to the current host

users [OPTION]… [ FILE ]

who | cut -d ' ' -f1

cat /etc/passwd | grep '/home'

Output who is currently logged in according to FILE. If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common.

display this help and exit
output version information and exit

The full documentation for users is maintained as a Texinfo manual. If the info and usersprograms are properly installed at your site, the command
info users

should give you access to the complete manual.