View login statistics for yourself or others in Unix
The Unix command last
displays a list of
previous logins for all system users. Entered by itself, the
last
command will display logins of every type, for every
individual, possibly going back months. For a more manageable search,
add a maximum lines tag that limits the number of logins listed. At the
Unix prompt, enter:
last -n
Replace n
with a number. For example, if you wanted a list of
the last 30 people to log into the computer on which you are currently
working, at the Unix prompt, you would enter:
last -30
You can also specify a user by entering his or her username after
the maximum lines tag. For example, if you are looking for the times user
hsolo
was logged in, but you are only interested in the last 10
logins, you would enter:
last -10 hsolo
Different implementations of Unix deliver different kinds of
information and may have different options and tags available. For
more information, read the man page entry for the last
command. At the Unix prompt, enter:
man last
last
command works only on
logins to the node you are using. You cannot log into one node and
request login information for a different node.
At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.
Related documents
This is document aaoe in the Knowledge Base.
Last modified on 2023-07-14 08:47:47.