users

Print the names of all logged-in users on the current host.

Summary

users [OPTION]... [FILE]

The main purpose

Options

--help Display help information and exit.
--version Display version information and exit.

Parameters

FILE (optional): A file that records the user's current login status; /var/run/utmp and /var/log/wtmp are used by default.

return value

Returning 0 indicates success, returning a non-zero value indicates failure.

example

[root@localhost ~]# users
root root

Notice