This tutorial explains Linux “users” command, options and its usage with examples.
users – print the user names of users currently logged in to the current host
Description :
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.
Usage :
users [OPTION]… [ FILE ]
advertisement
advertisement
Options :
–help
display this help and exit
Example :
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!
List logged in users
$ users
abc
Note : As only one user is logged on, hence only one username is displayed, else a space seperated list of users is displayed.
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.
advertisement
If you wish to look at all Linux commands and their usage examples, go to Linux Commands Tutorial.
If you find any mistake above, kindly email to [email protected]Related Posts:
- Practice Programming MCQs
- Check Information Technology Books
- Check Linux Books
- Apply for Programming Internship