users command in Linux system is used to show the user names of users currently logged in to the current host. It will display who is currently logged in according to FILE. If the FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common.
users [OPTION]... [FILE]
Example: users command without any option will print the users currently logged in.
- users –help: This option will display the help mesage and exit.
- users –version: This option will show the version information and exit.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.