Linux users command tutorial

The Linux users command is a useful tool to monitor users in Linux system. When invoking the 'users' command with no option, it prints the user names of users currently logged in to the current Linux system. The Linux users command output who is currently logged in according to 'file', by default using the /var/run/utmp if 'file' is not specified.

This is the Linux users command syntax:

users [OPTION]... [ FILE ]

Here is an example on how to run Linux users command with no option in Slackware:

bill@slackware:~$ users
bill root
bill@slackware:~$

The result shows two Linux users currently login to the system. One is a user with login name 'bill' and the other one is 'root'.

Here is an example on how to run Linux users command with FILE specified in Ubuntu:

kucing@ubuntu:~$ users /var/log/wtmp
kucing kucing

That's all for now.

Back to Other important Linux basic commands main page.

Add new comment